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

Are there structures in java?

0 Answers  


What is bean? Where it can be used?

0 Answers  


What is a double vs float?

0 Answers  


Consider that class classA, abstract class classB, and final classC have been defined.Which one of the following is correct? 1. classA extends classC implements classB 2. class A extends classB, classC 3. classA extends classB 4. classB implements classC

2 Answers  


Difference between stack and queue?

0 Answers   Flextronics,


What is the difference between heap memory and stack memory?

0 Answers   Aspiring Minds,


Can we create a constructor in abstract class?

0 Answers  


Explain about exception propagation?

0 Answers  


Is string a keyword in java?

1 Answers  


What is linked hashmap and its features?

0 Answers  


How are multiple inheritances done in Java?

0 Answers   Atos Origin,


Can anonymous class have constructor?

0 Answers  


Categories