Skip to content

Commit 18e4c47

Browse files
committed
Create PropertiesStoreTest.java
1 parent e62eda2 commit 18e4c47

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//version 11.1
2+
3+
// PropertiesStoreTest.java
4+
5+
import java.util.*;
6+
import java.io.*;
7+
8+
class PropertiesStoreTest
9+
{
10+
public static void main(String s[])
11+
{
12+
try
13+
{
14+
FileOutputStream fout=new FileOutputStream("abc.properties");
15+
Properties p=new Properties();
16+
p.setProperty("AA","Developer");
17+
p.setProperty("BB","Tester");
18+
p.setProperty("CC","Developer");
19+
20+
p.store(fout,"details of employees");
21+
System.out.println("properties are stored successfully");
22+
}
23+
catch(Exception e)
24+
{ e.printStackTrace();
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)