karthick devaraj

Greenhorn
+ Follow
since Nov 17, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by karthick devaraj

hai
== operator which checks only addresses of two different objects while equals() methods checks values in the objects. the equals() method more sensible than the == operator
hai all,
please anyone tell me the following with explanation?


if("String".toString()=="String")
{
System.out.println("equal");
}
else
{
System.out.println("not equal");
}
can anyone tell me the following answer?give me detailed reson?
class A
{
int x=10;
}
class B extends A
{
int x=20;
}
class Test
{
public static void main(String args[])
{
A a=new B();
System.out.println(a.x);
}
}