Java Properties Örneği
Java Properties Örneği
package javapropertiesexample;
import java.io.*;
import java.util.*;
public class JavaPropertiesExample {
public static void main(String[] args) throws IOException {
Properties PropertiesVariable= new Properties();
PropertiesVariable.setProperty("keya", "Ammar");
PropertiesVariable.setProperty("keyb", "Aslan");
PropertiesVariable.store(new FileOutputStream("deneme.properties"), null);
PropertiesVariable.load(new FileInputStream("deneme.properties"));
System.out.println(PropertiesVariable.getProperty("keya"));
System.out.println(PropertiesVariable.getProperty("keyb"));
}
}
Yorumlar
Yorum Gönder