Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java store data

//Open a file
File properties = new File("properties.txt");

//Writing
Properties p = new Properties();
p.setProperty("johndoe.pin", "12345");
p.store(new FileOutputStream(properties), null);
        
//Reading
Properties p = new Properties();
p.load(new FileInputStream("properties.txt", "");
p.getProperty("johndoe.pin"); //Returns the value if presents, otherwise null
Comment

PREVIOUS NEXT
Code Example
Java :: what is the max size of array in java 
Java :: string array to string stream java 
Java :: how to create textview in java android 
Java :: java static keyword 
Java :: java dictionary initialization 
Java :: Java 7. Converting List<List<Integer to int[][]: 
Java :: Java Remove ArrayList Elements 
Java :: Alerter for java 
Java :: java change hashmap value 
Java :: uml to java 
Java :: get value from Spring application.properties 
Java :: java stream findany 
Java :: how to use Add Grepper Answer (a) 
Java :: java read fule get String 
Java :: binary tree java 
Java :: convert java code to kotlin online converter 
Java :: menu alert dialog in android 
Java :: Java char Keyword 
Java :: javax 
Java :: arraylist methods in java 
Java :: inorder traversal 
Java :: java meeting scheduler 
Java :: writeToFileAsync java 
Java :: Main method not found in class Ponga, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application 
Java :: show menuitem when menu hovered javafx 
Java :: access char in string 
Java :: Creategoogle maps marker with custom image/bitmap 
Java :: reverse words in a string java 
Java :: Get generic type of class at runtime 
Java :: blast multiple protein files 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =