Iseng ,,,
Ayo outputnya apa ???
class Bangun
{
public int bangun (int a,int b, int c)
{
System.out.println("Volume Balok :");
return a*b*c;
}
public double bangun(double b)
{
System.out.println("Luas lingkaran:");
double a=3,14;
return a*(b*b);
}
public static void main(String args[])
{
Bangun b=new Bangun ();
System.out.println(b.bangun(5,10));
System.out.println(b.bangun(1000.6,1000.5));
}
}
class Bangun
{
public int bangun (int a,int b, int c)
{
System.out.println("Volume Balok :");
return a*b*c;
}
public double bangun(double b)
{
System.out.println("Luas lingkaran:");
double a=3,14;
return a*(b*b);
}
public static void main(String args[])
{
Bangun b=new Bangun ();
System.out.println(b.bangun(5,10));
System.out.println(b.bangun(1000.6,1000.5));
}
}
Komentar
Posting Komentar