1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answers were Sorted based on User's Feedback
Answer / ravikiran
first one will create an object on the heap
second one will create two objects one will saved on the
heap and another will get saved on the string pool
| Is This Answer Correct ? | 0 Yes | 6 No |
Answer / p.sreekiran
in first string class it create in heep memory and second
is created object in constant memeory we cannot change the
second one
| Is This Answer Correct ? | 2 Yes | 13 No |
What is stream api in java8?
What is java reflection?
When can you say a graph to be a tree?
when there is a need of jvm then how we can say that java is a platform independent language?
Can a top level class be private or protected?
If you are given the name of the function at run time how will you invoke the function?
What is comparable and comparator interface? List their differences
How to use string tokenizer class.
What is OOPS Concept?
Can we execute a program without main() method?
How are java objects passed to a method and what are native methods?
What is the life cycle of Thread ?
12 Answers HCL, Varnar Softech,