I learnt about JAVA basic level. Then, I meet some problem... the inner class instance is not created.
public class example {
class book {
private String name = null;
private int page = 0;
book(String name, int page) {
this.name = name;
this.page = page;
}
String getName() {
return this.name;
}
int getPage() {
return this.page;
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
book b1 = new book("book1", 300); // this line is making an error
System.out.println(b1.getName());
System.out.println(b1.getPage());
System.out.println();
}
}