Core Java Interview questions

Total available count: 646
Subject - Java Technologies
Subsubject - Core Java

Why String is immutable in java?

 There are several reasons for string is of the main reason is security issue,generally parameters are        typically represented as String in network connections, database connection urls, usernames/passwords etc.  If it were mutable, these parameters could be easily changed.


Next 5 interview question(s)


What is the difference between creating string object using string literal and using new keyword in java?


How can you create String object using new keyword with example?


 Will it create two objects If two strings have same value using String literal in java?


How can you create String object using String literal with example?


In how many ways String object can be created in java?