Untitled
unknown
plain_text
2 years ago
713 B
9
Indexable
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
public class propertiesfile {
public static void main(String[] args) throws IOException
{
Properties property= new Properties();
// INSERT THE VALUE:--
property.setProperty("name", "manish");
property.setProperty("job", "Test Enggineer");
property.setProperty("Location", "Bangalore");
// SET PATH IN PROPERTY FILE..
String filepath=System.getProperty("user.dir")+"\\Configuration\\writeproperty";
//
FileOutputStream fos = new FileOutputStream(filepath);
property.store(fos, "Sample data in properties file");
fos.close();
}
}
Editor is loading...
Leave a Comment