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 |
What are multiple inheritances?
What is r in java?
What state is a thread in when it is executing?
What is an class?
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.
How do you break a loop?
what is the use of thread?Justify it by project point of view
How does a for loop work?
Is it possible to specify multiple jndi names when deploying an ejb?
What is string value?
What does 3 dots mean in java?
write a program to create an vector and listeterator.and value should be enter through keyboard.