Posts

Showing posts from March, 2024

follow

STRINGS

 Strings are generally immutable in nature., Whereas StringBuffer & String Builder are mutable  Reason - Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames that cannot be modified StringBuffer - mutable, thread-safe StringBuilder - mutual, not thread-safe 'String' - Not a keyword, It is not a primitive data type, it is a derived type Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames which cannot be modified. String Constant Pool : It  is a Special memory Region where JVM stores String Instances What is the String Constant Pool? The  String Constant Pool  (also known as the  String Intern Pool ) is a special area within the Java heap where  string literals  are stored. When you create a string liter...

STRINGS

 Strings are generally immutable in nature., Whereas StringBuffer & String Builder are mutable  Reason - Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames that cannot be modified StringBuffer - mutable, thread-safe StringBuilder - mutual, not thread-safe 'String' - Not a keyword, It is not a primitive data type, it is a derived type Security is the reason for Strings they are made immutable. because with strings you can able to access databases and files. sometimes strings store passwords & usernames which cannot be modified. String Constant Pool : It  is a Special memory Region where JVM stores String Instances What is the String Constant Pool? The  String Constant Pool  (also known as the  String Intern Pool ) is a special area within the Java heap where  string literals  are stored. When you create a string liter...