/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package classobjects;
class Student{
int Nim;
String Nama;
int Umur;
public void setNim(int N){
this.Nim=N;
}
public void setNama(String N){
this.Nama=N;
}
public void setUmur(int U){
this.Umur=U;
}
public void InfoStudent(){
System.out.println("Nim \t:"+Nim);
System.out.println("Nama \t:"+Nama);
System.out.println("Umur \t:"+Umur);
}
}
/**
*
* @author andi m
*/
public class ClassObjects {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Student A=new Student();
A.setNim(2343216);
A.setNama("Andy Moer");
A.setUmur(19);
A.InfoStudent();
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package classobjects;
class Student{
int Nim;
String Nama;
int Umur;
public void setNim(int N){
this.Nim=N;
}
public void setNama(String N){
this.Nama=N;
}
public void setUmur(int U){
this.Umur=U;
}
public void InfoStudent(){
System.out.println("Nim \t:"+Nim);
System.out.println("Nama \t:"+Nama);
System.out.println("Umur \t:"+Umur);
}
}
/**
*
* @author andi m
*/
public class ClassObjects {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Student A=new Student();
A.setNim(2343216);
A.setNama("Andy Moer");
A.setUmur(19);
A.InfoStudent();
}
}
No comments