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 are multiple inheritances?

0 Answers  


What is r in java?

0 Answers  


What state is a thread in when it is executing?

0 Answers  


What is an class?

0 Answers  


Given: 11. public static void main(String[] args) { 12. Integer i = uew Integer(1) + new Integer(2); 13. switch(i) { 14. case 3: System.out.println(”three”); break; 15. default: System.out.println(”other”); break; 16. } 17. } ‘What is the result? 1 three 2 other 3 An exception is thrown at runtime. 4 Compilation fails because of an error on line 12.

9 Answers  






How do you break a loop?

0 Answers  


what is the use of thread?Justify it by project point of view

7 Answers  


How does a for loop work?

0 Answers  


Is it possible to specify multiple jndi names when deploying an ejb?

0 Answers  


What is string value?

0 Answers  


What does 3 dots mean in java?

0 Answers  


write a program to create an vector and listeterator.and value should be enter through keyboard.

1 Answers   Axcend,


Categories