Let's consider a properties files named "conf.properties" with no content.
Suppose we need to add the following content to this file.
server=oracle
date.format=dd-mm-rrrr hh24:mi:ss
Then the java code for this would be..
Properties props = new Properties();
props.setProperty("server","oracle");
props.setProperty("date.format","dd-mm-rrrr hh24:mi:ss");
try{
props.store(new FileOutputStream("config.properties"), null);
}catch(IOException e){
}
Java J2ME JSP J2EE Servlet Android
Java read properties files
Let's consider a properties files named "conf.properties" with the following contents..
server=oracle
date.format=dd-mm-rrrr hh24:mi:ss
we can read the properties of the this file as following way with java..
Properties props = new Properties();
props.load(new FileInputStream("conf.properties"));
String server = props.getProperty("server");
String date = props.getProperty("date.format");
server=oracle
date.format=dd-mm-rrrr hh24:mi:ss
we can read the properties of the this file as following way with java..
Properties props = new Properties();
props.load(new FileInputStream("conf.properties"));
String server = props.getProperty("server");
String date = props.getProperty("date.format");
JavaScript tutorial : Getting started
Just put JavaScript code inside JavaScript tag as follows
<html>
<body>
<script type="text/javascript">
alert("Hi!");
</script>
</body>
</html>
<html>
<body>
<script type="text/javascript">
alert("Hi!");
</script>
</body>
</html>
JavaScript tutorial : What is javascript
JavaScript is the scripting language for web. About all web browsers have support support.
*Java script is easy to learn which made JavaScript popular.
*Java script is easy to learn which made JavaScript popular.
Subscribe to:
Posts (Atom)