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());
}
}
Answers were Sorted based on User's Feedback
Answer / mohammad aleemuddin
Compilation Error
return type required for the methods..
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / guest
sorry it ll not give any output as tthere is no object has
been created to call methods of super class
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / jitendra
Cannot make a static reference to the non-static field a
| Is This Answer Correct ? | 0 Yes | 0 No |
What is declaration?
How long does it take to master java?
What are the tools in java?
How many types of modules is defined by j2ee specification?
Why do we use j2ee?
What is java developer job description?
Is eclipse written in java?
What is main method in java?
What is java used for in technology?
Is java part of oracle?
What are the four types of J2EE modules?
What are the different types of events in java?