2012420098
OVERRIDING_INFO PEMAIN
*/
public class bolla1 {
String nama;
String club;
String posisi;
void nama (){
}void club(){
}void posisi(){
}}
class delpero extends bolla1{
@Override
void nama (){
System.out.println("nama="+nama);
}
@Override
void club (){
System.out.println("club="+club);
}
@Override
void posisi(){
System.out.println("posisi="+posisi);
}}
class messi extends bolla1{
@Override
void nama (){
System.out.println("nama="+nama);
}
@Override
void club (){
System.out.println("club="+club);
}
@Override
void posisi (){
System.out.println("posisi="+posisi);
}
}
class xavi extends bolla1{
@Override
void nama (){
System.out.println("nama"+nama);
}
@Override
void club (){
System.out.println("club="+club);
}
@Override
void posisi (){
System.out.println("posisi="+posisi);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
bolla1 o=new bolla1();
delpero a=new delpero();
messi b=new messi();
xavi c=new xavi();
a.nama="delpero meyeng";
a.club="juventus";
a.posisi="penyerang";
a.nama();a.club();a.posisi();
System.out.println("=========================");
b.nama="lionl messi menyeng";
b.club="fc barcelona youman";
b.posisi="second penyerang";
b.nama();b.club();b.posisi();
System.out.println("============================");
c.nama="xavi meyeng youman";
c.club="fc barcelona";
c.posisi="gelangan tengah";
c.nama();c.club();c.posisi();
System.out.println("================================");
}
}
Posted by 01.05 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar