You are viewing a single comment's thread. Return to all comments →
I am getting Compiletion Error..
Message: "MyBook.java:25: error: class Main is public, should be declared in a file named Main.java public class Main{ ^ 1 error"
My code:
//Write MyBook class here
public class MyBook extends Book{ String title; void setTitle(String s){ title = s; } String getTitle(){ return title; } }
Any please help me.. Thank you advance..
Seems like cookies are disabled on this browser, please enable them to open this website
Java Abstract Class
You are viewing a single comment's thread. Return to all comments →
I am getting Compiletion Error..
Message: "MyBook.java:25: error: class Main is public, should be declared in a file named Main.java public class Main{ ^ 1 error"
My code:
//Write MyBook class here
public class MyBook extends Book{ String title; void setTitle(String s){ title = s; } String getTitle(){ return title; } }
Any please help me.. Thank you advance..