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
What is private static in java?
In java, how we can disallow serialization of variables?
What is difference between static class and singleton pattern?
What is the difference between Array and Hash Table?
How do you do a line break in java?
How can we make sure main() is the last thread to finish in java program?
How do you write methodology?
Is double bigger than float?
What does int argc char * argv [] mean?
How is hashset defined in java?
1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?
What are the main uses of this keyword?
What technique is carried out to find out if a particular string is empty?
What are the advantages of encapsulation in java?
How do you achieve polymorphism in java?