cac bac cho minh hoi sao minh chay chuong trinh ma ho va ten lai ra null nhi ?
public class Student {
private String ten;
private double hocphi;
public void tenSinhVien (String tenSV){
ten = tenSV;
}
public void setHocPhi(double hp){
hocphi = hp;
}
public void inThongTin(){
System.out.println("Ho va Ten: "+ ten);
System.out.println("hoc phi la: "+ hocphi );
}
public static void main(String args[]){
Student sv1 = new Student();
sv1.setHocPhi(400);
sv1.inThongTin();
sv1.tenSinhVien("Nguyen Van A");
}
}