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

what is the use of a super keyword?

Answer Posted / upasana das

example of inheritance using super keyword
class a
{
int x,y;
a(int i,int j)
{
x=i;
y=j;
System.out.println(" "+x+" "+y);
}
}
class b extends a
{
int g;
b(int i,int j)
{
super(i,j);
g=i+i*(j*j);
System.out.println(g);
}
}
class mab
{
public static void main(String args[])
{
b ob=new b(24,2);
}
}

output: 24 2
120

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java web application?

893


What is java persistence api used for?

942


What is the difference between java se and java ee?

865


Can we use lambda without functional interface?

963


How do I open the java control panel?

927


Why bean class is used in java?

941


Which type of stream is in java?

877


How do I open java console?

930


Why there are no global variables in java?

949


Does netbeans need jdk?

898


In hibernate what is the difference between the Session and SessionFactory?

947


What if I write static public void instead of public static void?

873


What is a driver in java?

951


What is log4j in java?

916


When do we go for java 8 stream api? Why do we need to use java 8 stream api in our projects?

982