// my first class
public class FirstProject{
int first_number;
public FirstProject(){
first_number = 0;
}
public FirstProject(int Fn){
first_number = Fn;
}
public void Print(){
System.out.println("First number = " + first_number); System.out.println();
}
}
//第二个类在一个单独的文件中//在这个类上不断收到一个错误,说找不到 . 在 p1.print();
public class TestProgram {
public static void main(String[] args){
FirstProject p1 = new FirstProject(10);
p1.print(); System.out.println();
}