jesintha jegan

Greenhorn
+ Follow
since Jan 05, 2009
Merit badge: grant badges
For More
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 jesintha jegan

Please do correct me If I am wrong..

The instance variables are not overriden as they belong to class hence their value is determined on the basis of class instantiated at the compile time.

polymorphism works only for methods.

please have a look at the following code.

if you compile this means you will get the output as "parent".

In this case the yo object will reflect "Parent"(eventhough its a child object) because the instance variables are not overriden.

Hope i am clear.
15 years ago
Hi

I have seen the following code snippet in a site

Code:
class Parent {
String message = "parent";
}

class Child extends Parent {
String message = "child";
}

public class Test {
public static void main(String[] args) {
Parent yo = new Child();
System.out.println(yo.message);
}
}

ans:Parent


I expected that it would print as "Child" because i thought that the object "yo" is the reference of Child(bacause of new Child ();)
Can anyone explain me
Thanks Ankit . Please ignore my previous post .

Now im clear .
Thanks Ankit .

So don’t go for few topics in scjp 5.0 ?



Can you say something elaborately on this.
Hi all,

I’m preparing for Scjp1.5. But some of my friends are telling me to go for scjp1.6 ,which is the latest one.

But im little bit of scared to take scjp1.6. Because I started my preparation using K&B book(SCJP1.5) More over passing percentage is also higher than scjp1.5.

Is it enough to go for scjp1.6? or what are the books I have to refer to clear scjp1.6?
Or I have to buy a separate book for this.

Can anyone (who cleared scjp1.6) help me out?


Thanks in advance
Thanks vikram. But my voucher is going to expire on Apr 4th. I have to take my exam before that.

I hope i can do well.
Wow, Full score. Congrats
15 years ago
thanks everybody for the reply
Hi All

Preparing for SCJP 1.5. Planning to take the exam in the couple of month.

Can anyone tell me from which chapter i have to start preparation

Because i started to study K&B book five days back.But still i haven't crossed the first chapter.

Please Suggest me some idea ops:
Wow Great Score. Congrats
15 years ago
Congrats Russy
15 years ago