Ajay Ajay

Greenhorn
+ Follow
since Mar 28, 2004
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 Ajay Ajay

Thanx for u'r feliciations and for u'r sensible advice. Will the sun microsystem releases SCBCD1.4(Business component logic ) exam soon. If there's any proposal like that, Plz do inform.

Once again thank u.

Ajay
17 years ago
Hi everybody,
I am glad to admit I cleared SCJP with good score. I am studying Servlets and EJB concurrently. I finished studying JSP. I am studying the certification books of SCWCD1.3 study kit and Head first EJB directly without studying other books.
Which is better to take SCWCD1.3 or SCWCD1.4? Or Is it better to take SCBCD exam b4 without taking SCWCD. Next month onwards, I've to search for a job. Which certification will be useful to get job? Please give me you suggestions.

Expecting your suggestions.

Ajay
17 years ago
Thanx for Vignesh and Karthikeyan. U'r wishes and advice kindles my spirit further.
Ajay
18 years ago
Well done Karthikeyan. Keep it up. Right now,I'm preparing for SCJP.
Ajay
18 years ago
Hi dude,
I'll try to complete the remaining code and I'll give explanation for it.
V1 is a reference variable to Object Valuepair.
V2 is a Object class(Root for all the classes)reference variable pointing to object valuepair.
equals is a method of object class and we are overriding here to check whether the contents of both objects are equal.Whenever we r overriding equals() method,we have to implement hashcode().

class ValuePair
{
public int a,b;
public boolean equals(Object other)
{
try
{
/* Object Casting should take place because the Object class reference variable points to the Object of valuepair*/
ValuePair o=(ValuePair)other;
return(a==o.a && b==o.b) || a==o.b && b==o.a);
}
catch(ClassCastException e)
{
return false;
}
}
public int hashCode()
{
//implementation here.
}
}
public class AppClass
{
public static void main(String []args)
{
valuepair v1 = new valuepair();
Object v2 = new valuepair();
if (V1.equals(v2))
System.out.println("Both object are equal");
else
System.out.println("Both object are not equal");
}
}