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...

in a constructor what happen if u call super and this in
the same class? i know that it is not possible to call
both in the same one? if we call what will happen?

Answer Posted / atul

class A
{
public A()
{ super();//this is perfect no error
super();//but this call generate RunTimeException
//because inside constructor super called
//must be in first called ok thats it
}
public static void main(String args[])
{
A a1=new A();

}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of log?

989


What is a singleton class? Give a practical example of its usage.

1100


what is optional in java 8?

1054


What is array pointers ?

1026


What is immutable state?

1019


Why strings in java are called as immutable?

987


what is object slice?

2079


What is jit compiler in java?

1103


What are the types of inner classes (non-static nested class) used in java?

1061


Explain the difference between the public, private, final, protected, and default modifiers?

1040


What is not object oriented programming?

940


What is the exact difference in between Unicast and Multicast object?

2118


Which types of exceptions are caught at compile time?

1030


What is a superclass?

1344


What is method overriding in java ?

1186