strings in java are objects.why?
Answers were Sorted based on User's Feedback
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 |
Answer / shankar
Strings in java are immutable i.e, not changable.It is
constant.
By,
Shanku
Is This Answer Correct ? | 2 Yes | 3 No |
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
Can a constructor call another constructor?
How to make a method thread safe without using synchronized keyword?
8 Answers Persistent, Societe Generale,
What is meant by oops concept in java?
Where can I find jdk in my computer?
Can you instantiate the math class?
Can classes declared using the abstract keyword cab be instantiated?
What is variable declaration and definition?
What is the private method modifier?
suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?
wHAT IS DEFAULT SPECIFIER IN JAVA wHAT IS DEFAULT CONSTRUCTOR IN JAVA wHAT IS DEFAULT METHOD IN JAVA
What is the generic class?