1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answer Posted / 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 |
Post New Answer View All Answers
Explain about interrupt() method of thread class ?
What is comparator in java?
How many characters is 16 bytes?
What is the use of default method in interface in java? Explain
Is arraylist sorted in java?
Can you explain inner class.
What is a modifier?
What state is a thread in when it is executing?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
Can you use this() and super() both in a constructor?
What is difference between array and arraylist in java?
Do I need to import java.lang package any time? Why?
Can we declare the static variables and methods in an abstract class?
How do I enable java in safari?
Is array passed by reference in java?