How is it possible for two string objects with identical values not to be equal under the == operator?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What is the difference between set and list?

5 Answers  


What JNDI(Java Naming and Directory Interface) provides?

4 Answers  


Tell me about different OOPS concepts.

0 Answers   Amdocs,


what is the difference between String s="hello"; and String s=new String("hello");?

3 Answers  


Why object class is super class for every class in java?

0 Answers  


What is a parameter in a function?

0 Answers  


Where are register variables stored?

0 Answers  


what is polymorhism what is inheritance? what is Abstract n Interface? what if two interfaces have same method and a concrete class is implementing both the interfaces. Will there be a compilation error? What are mutable and immutable classes? How can u make a class mutable? when will u use dem ...explain with example? what is overriding and overloading? what is garbage collection? what is Thread? how do dey communicate? what are the different ways of implementing ? have u used any messaging technologies? what is synchronization? what are some additions in java 1.5? what are generics? whst is advanced for loop? what is finally block? can u have a try in finally? yes!! can u have a finally in finally? how do you write junits? when is a object eligible for garbage collection?explain? a = null and b has ref to a will b be eligible to be garbage collected? sql questions like diff joins? how do dey work? exception handling? what is marker interface? what is the need??

0 Answers   JPMorgan Chase,


What is purpose of keyword void?

0 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

0 Answers  


What is ++ a in java?

0 Answers  


If I will write String s=new String("XYZ"); String s1=new String("XYZ"); if(s.equals(s1)){ sop("True"); } else{ sop("False"); } This program will give me "True". But When I am creating my own class suppose class Employee{ public Employee(String name); } Employee e= new Employee("XYZ"); Employee e1 = neew Employee("XYZ"); if(e.equals(e1)){ sop("True"); } else{ sop("False"); } Then it will give the output as "False". Can I know what is happening internally?

5 Answers  


Categories