What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference.
(Note : Pls ignore syntx errors)
public class One {
sop ("Into One--");
}
public class Two extends One{
sop ("Into Two--");
}
public class Home {
One a; Two t;
public static void main(argv[])
{
sop ("In Home--");
sop(One.a);
sop(Two.a);
sop(One.t);
sop(Two.t);
}
}
Answer Posted / pokuru surendra
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
One.a cannot be resolved
Two.a cannot be resolved
One.t cannot be resolved
Two.t cannot be resolved
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between object state and behavior?
What is a tasks priority and how is it used in scheduling?
wahts is mean by dynavalidatorform in struts/
Why do I get a duplicate name error when loading a jar file?
What restrictions are placed on the values of each case of a switch statement?
how i secure my site with the https protocol.what are the steps?
What is the difference between java class and bean?
What are the pros and cons of detached objects?
int x=5,i=1,y=0; while(i<=5) { y=x++ + ++x; i=i+2; } System.out.println(x); System.out.println(y); System.out.println(i); How to solve this? Please explain!
What is difference between object state and behavior?
What is the difference between long.class and long.type?
Can constructors be synchronized in java?
What are the types of scaling?
What is the difference between system.out ,system.err and system.in?
What is the difference between the session.update() method and the session.lock() method?