Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

Can the main method be declared final?

182


What is data encapsulation?

191


Is lambda functional programming?

136


What is jep in java?

125


How do I run a project in eclipse?

130






What can open a jar file?

138


Why oracle type 4 driver is named as oracle thin driver?

158


What is setstring method in java?

143


How do I open the java console in windows 10?

139


Who created eclipse?

130


What's the difference between code-based security and role-based security? Which one is better? : java security

178


What is a java proxy?

128


What is web xml java?

138


What is dao in java?

130


what about jdb and javadoc by example ?

1323