Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value..

Answer / mohammad aleemuddin

Compilation Error
return type required for the methods..

Is This Answer Correct ?    7 Yes 0 No

Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value..

Answer / jahir

compile time error.

Is This Answer Correct ?    0 Yes 0 No

Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value..

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

Whats the O/p of the below code snippet ? And explain how does it imply the concept of call-by-value..

Answer / jitendra

Cannot make a static reference to the non-static field a

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More J2EE Interview Questions

What is declaration?

0 Answers  


How long does it take to master java?

0 Answers  


What are the tools in java?

0 Answers  


How many types of modules is defined by j2ee specification?

0 Answers  


Why do we use j2ee?

0 Answers  


What is java developer job description?

0 Answers  


Is eclipse written in java?

0 Answers  


What is main method in java?

0 Answers  


What is java used for in technology?

0 Answers  


Is java part of oracle?

0 Answers  


What are the four types of J2EE modules?

0 Answers  


What are the different types of events in java?

0 Answers  


Categories