Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value/call-by reference. (PS : Pls ignore syntax errors)
public class One {
public oneA(){
sop ("Into One--");}
}
public class Two extends One{
public twoT(){
sop ("Into Two--"); }
}
public class Home {
One a; Two t;
public static void main(argv[])
{
sop ("In Home--");
sop(a.oneA());
sop(t.oneA());
sop(a.twoT());
sop(t.twoT());
}
}
Answer Posted / jitendra
Cannot make a static reference to the non-static field a
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the j2ee technologies?
Is java safe to download?
What is the concept of connection pooling?
What is front end technology in java?
What is java transaction service (jts)?
Is java a tool?
What is webservices in java?
What is java ee server?
What is comment?
How will you explain cdata?
What is main method in java?
How java is used in web applications?
What is java 2 platform, standard edition (j2se)?
Differentiate between .ear, .jar and .war files.
What is java developer?