Pangil_aku_Andi

Don't Give Up in Life …

Program Method


//program method
class aku1{
String nama;
int nim;
void printaku(){
System.out.println(” Nama\t:”+nama);
System.out.println(” NIM\t:”+nim);
}
}
public class aku12{
public static void main(String[]args){
aku1 saya= new aku1();
saya.nama=”Andi Mardianto”;
saya.nim=2009470138;
saya.printaku();
}
}

save as dengan “aku12.java”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: