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 / 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 |
Post New Answer View All Answers
What are j2ee technologies?
What is use of final keyword in java?
What is instance in java?
What is distributed application?
to update a batch in a table in jdbc which method of statement object is used
What is conversational state?
Why is j2ee needed?
Since we can create managed bean by two ways as, we can define the bean name in faces-config.xml file so that page can use that OR we can write annotation on bean class so that it is automatically assign to page but I want to know which one is good programming practice ? And also mention disadvantage of other which should not prefer ... Thanking you...
What type of code is java?
How do you run a java program?
What is main method in java?
Explain jta, jndi, and jms.
What is external subset?
I Want build and release interview questions
What is javaserver pages standard tag library (jstl)?