Ask coding questions

← Back to all posts
Error in java
PancakeDev

Hi coders !

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

Voters
PancakeDev
Comments
hotnewtop
JacobMcPherson1

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);