Why java uses the concept of the string literal?



Why java uses the concept of the string literal?..

Answer / Priyanka Verma

Java uses string literals (also known as string constants) to improve performance and simplify program syntax. String literals are stored in a special pool called a constant pool, which allows for efficient reuse of strings by multiple objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the abstract class?

1 Answers  


What does it mean to be immutable?

1 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT

1 Answers   Google,


What is ternary operator? Give an example.

1 Answers  


What is the difference between pageContext and page implicit objects in jsp?

9 Answers   Gspann Technologies, Merrill Lynch, Polaris,


What is singleton class and how can we make a class singleton?

1 Answers  


define System.out.println(); what is the meaning!

19 Answers   Accenture,


Difference between predicate, supplier and consumer ?

1 Answers  


Have you worked on bits programming? examples?What is bit? How many bits are there in the byte?

1 Answers  


what is meant by UP& DOWN casting in java?

6 Answers  


What is the char data type?

1 Answers  


Categories