Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
713 B
0
Indexable
Never
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();
	
	
	
	
	
		
		
	}

}
Leave a Comment