Whenever I try to call a non static method, I always get the error "Non-static method cannot be referenced from a static context". Anyways this can be solved?
int pages;
pages = content.length()/ 700;
if (content.length()%700!= 0) {
pages = pages+1;
}
return pages;
} ```
```public double getPrice(int index){
double price = 0;
int pages = Book.getPages();
if (index == 0){
throw new IndexOutOfBoundsException();
}
else {
price = (locationFactor * ());
}
return price;
}```