Subbarao Anaparthi

Greenhorn
+ Follow
since Mar 01, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Subbarao Anaparthi

equals() on Object(Except for String & Wrapper Classes) uses == operator.

for example
Object o=new Object();
Object o1=o;
if(o1.equals(o)) returns true becaus o,o1 references points to same object.
equals() is overridden into String & Wrapper Classes.
and equals() in String and All Wrapper classes compares the contents in the reference variable.

thats why equals() works differently on String & StringBuffer.
because equals() on StringBuffer takes equals() from Object and equals() on String takes the overridden method in String class.

[ March 01, 2005: Message edited by: Subbarao Anaparthi ]
[ March 01, 2005: Message edited by: Subbarao Anaparthi ]
19 years ago
what are the various ways to handle the exceptions in java. Can any one give Examples
19 years ago