How to Convert Properties to Map in Java

Convert Properties to Map in Java

This example program about, How to convert properties to map in java. The example was tested with environment and shared in the post.

1) Converting Properties to Map in Java

2) Complete Example

3) Sample Property File

How to Convert Properties to Map in Java

Output

first.name – Dinesh
second.name – Krishnan
email – [email protected]
full.name – Dinesh Krishnan
country – India

References

1. Java Properties Class
2. Java Map Interface
3. Java HashMap Class
4. Java File Class
5. Java FileReader Class
6. Java Set Interface
7. Java Iterator Interface