strings in java are objects.why?

Answers were Sorted based on User's Feedback



strings in java are objects.why?..

Answer / modi

In Java strings are objects designed to represent a sequence
of characters. Because character strings are commonly used
in programs, Java supports the ability to declare String
constants and perform concatenation of Strings directly
without requiring access to methods of the String class.
This additional support provided for Java Strings allows
programmers to use Strings in a similar manner as other
common programming languages.
A Java String is read-only and once created
the contents cannot be modified.

Is This Answer Correct ?    14 Yes 1 No

strings in java are objects.why?..

Answer / shankar

Strings in java are immutable i.e, not changable.It is
constant.
By,
Shanku

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More Core Java Interview Questions

What is double word?

0 Answers  


What is the integer of 16?

0 Answers  


Give a practical example of singleton class usage?

0 Answers  


Explain the differences between public, private, protected and static?

4 Answers  


Objects or references which of them gets garbage collected?

0 Answers  


How to avoid the runtime exception ?

2 Answers  


Is oracle charging for java?

0 Answers  


without using arthematic operation ,how can you write the logic for adding/substraction/multiplication?

7 Answers   Tanla Solutions, Wipro,


What are alternatives to java serialization?

0 Answers  


Explain the importance of throwable class and its methods?

0 Answers  


What is compiler and what its output.

0 Answers   Cognizant,


Explain the importance of finally over return statement?

0 Answers  


Categories