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 server in j2ee?
What is java ee architecture?
What is source file in java?
Describe action form?
Can I run seam in a j2ee environment?
What is the concept of connection pooling?
What is mean by j2ee?
Write a program for Sum of the digits for a given number Ex: suppose user entered Number is 1214, It should calculate the above number like 1+2+1+4 = 8
How many types of component events are in java?
What is deployer?
What is java api for xml processing (jaxp)?
Is string an object in java?