Skip to content

Commit 956a670

Browse files
committed
Section 23 Java IOStreams
Signed-off-by: https://github.com/Someshdiwan <someshdiwan369@gmail.com>
1 parent 5197ab4 commit 956a670

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Section23JavaIOStreams/Properties/Move to right place/Theory Behind the PropertiesDemo Program.txt renamed to Section23JavaIOStreams/Properties/src/Properties In Java.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Theory Behind the `Package.PropertiesDemo` Program
1+
Theory Behind the `src/Package/PropertiesDemo.java` Program
22

33
## 1. Introduction to `Properties` Class
44
- The `Properties` class is part of `java.util` and **extends `Hashtable<Object,Object>`**.
@@ -123,18 +123,18 @@ String os = p.getProperty("OS");
123123
124124

125125
10. Best Practices
126-
• Always prefer getProperty(key, defaultValue) → prevents null return values.
127-
• For i18n → use ResourceBundle (internally uses Properties).
128-
• For modern applications, prefer UTF-8 XML storage over plain .properties.
129-
• Keep sensitive properties (like DB passwords) encrypted.
126+
• Always prefer getProperty(key, defaultValue) → prevents null return values.
127+
• For i18n → use ResourceBundle (internally uses Properties).
128+
• For modern applications, prefer UTF-8 XML storage over plain .properties.
129+
• Keep sensitive properties (like DB passwords) encrypted.
130130

131131
132132

133133
11. Quick Recap
134-
• Properties is a Hashtable-based class specialized for String key-value pairs.
135-
• Can store data in both .properties and .xml formats.
136-
• Provides easy persistence (store/load).
137-
• Extremely useful for configurations, metadata, and i18n.
138-
• Requires caution with encoding, special characters, and overwriting.
134+
• Properties is a Hashtable-based class specialized for String key-value pairs.
135+
• Can store data in both .properties and .xml formats.
136+
• Provides easy persistence (store/load).
137+
• Extremely useful for configurations, metadata, and i18n.
138+
• Requires caution with encoding, special characters, and overwriting.
139139

140140
---

0 commit comments

Comments
 (0)