GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Programming  >  Java

 Print  |  
Question:   What is the difference between == & .equals



October 10, 2005 02:50:41 #7
 mehar   Member Since: Visitor    Total Comments: N/A 

RE: What is the difference between == & .equals
 

The difference between ==  and .equals is

String a="john",b="joi";

if (a.equals(b))// it compares internaly for the same materials

if(a==b)// it compares for the memory location

     

 

Back To Question