Here are some examples of how you might use it:
class A{
int value;
public A(int value){
this.value = value;
}
}
Type: Posts; User: bbr201
Here are some examples of how you might use it:
class A{
int value;
public A(int value){
this.value = value;
}
}
If you insist on designing it the way you are, I guess the quickest and simplest fix would be something like this:
public static void main(String[] args) {
Book b=new Book();
b.first=new...
Just from a quick glance, it looks like the Book class' private Chapter reference variables never actually point to anything. They are initialized to null in the constructor and they never point to...