only for presentation purposes |
Please refer this to all your pals on all your social networks..thank you !
The grey color is only for the background it should cause no problems.
-----------------------------------------------------------------------------------------------------------
class Person
{
String name;
int code;
Person()
{
}
Person(String n,int c)
{
name=n;
code=c;
}
void display()
{
System.out.println("name is"+name+"code is"+code);
}
}
class Account extends Person
{
long pay;
Account()
{
}
Account(String n,int c,long p)
{
super(n,c);
pay=p;
}
void display()
{
super.display();
System.out.println("pay is"+pay+"rs");
}
}
class Admin extends Account
{
int exp;
Admin()
{
}
Admin(String n,int c,long p,int e)
{
super(n,c,p);
exp=e;
System.out.println("EXP is"+exp+"years");
}
}
class Network
{
public static void main(String args[])
{
Admin a=new Admin("yourname",102,2000000,2);
a.display();
}
}
0 comments:
Post a Comment