Working notes on Java Properties file.
Imports java.io.FileInputStream;.
Imports java.io.FileNotFoundException;.
Imports java.io.InputStream;.
Imports java.io.IOException;.
Imports java.util.Properties;.
Public class PropertiesExample.
##
Public static void main(String[] args).
###
Properties prop = new Properties();.
Try.
###
String fileName = "app.config";.
InputStream is = new FileInputStream(fileName);.
Prop.load(is);.
System.out.println(prop.getProperty("app.name"));.
System.out.println(prop.getProperty("app.version"));.
System.out.println(prop.getProperty("app.vendor", "Code Java"));.
Default.
}.Catch (FileNotFoundException e).
##
E.printStackTrace();.
}.Catch (IOException e).
##
E.printStackTrace();.
}.}.}.Updated:
2026 Aug 19

