difference between String a; and String a=new String();?
y do v need to assign memory to the variable?
Answer Posted / janardhan
String a; :---
JVM will create String object in SCPM(String constant pool
memory)only.
String a=new String();:---
JVM will create String object in two memories
1. Heap memory
2. String constant pool memory.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the difference between length and size in java?
What is meant by class loader? How many types are there?
How do you input a string in java?
What are abstract classes and anonymous classes?
explain the concept of virtual method invocation in polymorphism in detail?
What are different types of multitasking?
What are voids?
Explain the difference between abstract classes and interfaces in java?
What is an example of a boolean?
worst case complexities of Quick sort and Merge sort.
What is the difference between the boolean & operator and the && operator in java programming?
What is an interface in java?
Can a string be null?
Explain the usage of this with constructors?
Is a case study a method or methodology?