Ask coding questions

← Back to all posts
Error in java
PancakeDev (3)

Hi coders !

I'm learning Java adn when i was coding on this repl i got an error, run yourself, you'll see !

Comments
hotnewtop
JacobMcPherson1 (237)

make a function in your Book class that allows you to set the variables like title and author and after you define your class as a variable on line 17, set the variables with the function and then access them like System.out.println(myBook.title + "\n" + myBook.numberOfPages);