Working With Properties file using java

//Reading Properties file

Properties p = new Properties();

try{
p.load(new FileInputStream("propertyname.properties");

}
catch(Exception e ){
e.printStackTrace();
}


//Writing Properties file

Properties p = new Properties();
try{
p.load(new FileOutputStream(("propertyname.properties"),null);
}

catch(Exception e)
{

e.printStackTrace();
}

3 comments:

  1. Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
    Sharepoint Training in Chennai

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete