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 OOP Language?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
Is null an object java?
Explain OOPs concept.
What is the difference between an interface and an abstract class?
Why do we need wrapper class?
What are different types of inner classes ?
What is object-oriented programming?
What is the point of java?
What is a ternary operator in java?
What is boolean false?
What is a void method?
Is overriding possible in java?
Explain about anonymous inner classes in java?
List out benefits of object oriented programming language?