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
i want test pattern of zylog company and some examples also
What is caller?
Are java primitives objects?
What is jetty in java?
Why java is interpreted language?
Is java safe to download?
How to create object without using the keyword “new” in java?
What is java api for xml processing (jaxp)?
What is application client?
How do you run a java program?
What is credentials?
What is multi tier architecture in j2ee?
What is connector?
What is j2ee architecture?
Why frameworks are used in java?