Comparing Objects

Comparing Objects

When two String objects have the same value. When we are using == this operators is called the equal() method.

When we want to determine if two objects are meaningfully equivalent, use the equals() method. this operator returns a boolean value true this means that that are equal .if returns false .that means its we have a code .that are following here  : String x1 = \"abc\";
String x2 = \"ab\";
x2 = x2 + \"c\";

Date:2013-03-09 00:00:00

Post Your Answers

User Email:

User Name:

Related scjp1.5 chap7 Links

scjp1.5 chap7 interview questions and answers for experienced and fresher