Running Java Code Errors: Console Output Result Termination
-
Hello there fellow java users, I'm dealing with some situations with Java Eclipse, I was writing the codes for a public class related to 'books". basically using instance data for the author, publisher, copy right date, etc. I feel like I've got all the correct codes and everything but I feel as if I've stumbled onto a certain error that I can't fix. Every-time I try to run the program the console output says: book[Java Application] C:\Program Files (x86)\Java\jre7\bin\javaw.exe. I don't know what I did wrong, if anybody can help me that would be great. Here are the codes i wrote:
package book;
public class book {
public static void main(String[] args){} private String title; private String author; private String publisher; private int copyRightDate; public book(String authorName, String publisher, String author, String year22) { title = getTitle(); author = getAuthor(); publisher = getPublisher(); copyRightDate = year2(); } private int year2() { return 0; } public book(String authorName, String publisher2, String author2, int year32) { } public book() { author = "Ridley Pearson"; title = "Kingdom Keepers"; publisher = "Disney"; } public void setAuthor(String authorName) { author = authorName; } public String getAuthor() { return author; } public void setTitle(String bookTitle) { title = bookTitle; } public String getTitle() { return title; } public void setPublisher(String publisherName) { publisher = publisherName; } public String getPublisher() { return publisher;} public void setCopyRightDate(int date) { copyRightDate = date; } public int getCopyRightDate() { return copyRightDate; } public String toString() { return (title + "\\t" + author + "\\t" + publisher + "\\t" + copyRightDate);}
public class bookshelf{
}
public void main1(String[] args) { -
Hello there fellow java users, I'm dealing with some situations with Java Eclipse, I was writing the codes for a public class related to 'books". basically using instance data for the author, publisher, copy right date, etc. I feel like I've got all the correct codes and everything but I feel as if I've stumbled onto a certain error that I can't fix. Every-time I try to run the program the console output says: book[Java Application] C:\Program Files (x86)\Java\jre7\bin\javaw.exe. I don't know what I did wrong, if anybody can help me that would be great. Here are the codes i wrote:
package book;
public class book {
public static void main(String[] args){} private String title; private String author; private String publisher; private int copyRightDate; public book(String authorName, String publisher, String author, String year22) { title = getTitle(); author = getAuthor(); publisher = getPublisher(); copyRightDate = year2(); } private int year2() { return 0; } public book(String authorName, String publisher2, String author2, int year32) { } public book() { author = "Ridley Pearson"; title = "Kingdom Keepers"; publisher = "Disney"; } public void setAuthor(String authorName) { author = authorName; } public String getAuthor() { return author; } public void setTitle(String bookTitle) { title = bookTitle; } public String getTitle() { return title; } public void setPublisher(String publisherName) { publisher = publisherName; } public String getPublisher() { return publisher;} public void setCopyRightDate(int date) { copyRightDate = date; } public int getCopyRightDate() { return copyRightDate; } public String toString() { return (title + "\\t" + author + "\\t" + publisher + "\\t" + copyRightDate);}
public class bookshelf{
}
public void main1(String[] args) { -
so what is he supposed to do???
-
so what is he supposed to do???
-
Hello there fellow java users, I'm dealing with some situations with Java Eclipse, I was writing the codes for a public class related to 'books". basically using instance data for the author, publisher, copy right date, etc. I feel like I've got all the correct codes and everything but I feel as if I've stumbled onto a certain error that I can't fix. Every-time I try to run the program the console output says: book[Java Application] C:\Program Files (x86)\Java\jre7\bin\javaw.exe. I don't know what I did wrong, if anybody can help me that would be great. Here are the codes i wrote:
package book;
public class book {
public static void main(String[] args){} private String title; private String author; private String publisher; private int copyRightDate; public book(String authorName, String publisher, String author, String year22) { title = getTitle(); author = getAuthor(); publisher = getPublisher(); copyRightDate = year2(); } private int year2() { return 0; } public book(String authorName, String publisher2, String author2, int year32) { } public book() { author = "Ridley Pearson"; title = "Kingdom Keepers"; publisher = "Disney"; } public void setAuthor(String authorName) { author = authorName; } public String getAuthor() { return author; } public void setTitle(String bookTitle) { title = bookTitle; } public String getTitle() { return title; } public void setPublisher(String publisherName) { publisher = publisherName; } public String getPublisher() { return publisher;} public void setCopyRightDate(int date) { copyRightDate = date; } public int getCopyRightDate() { return copyRightDate; } public String toString() { return (title + "\\t" + author + "\\t" + publisher + "\\t" + copyRightDate);}
public class bookshelf{
}
public void main1(String[] args) {{
new book ("Kingdom Keepers III\n", "Disney In Shadow\n", "Ridley Pearson\n", year2);
new book("Kingdom Keepers IV\n", "Power Play\n", "Ridley Pearson\n", year3);
System.out.println("Kingdom Keepers III");
System.out.println("Kingdom Keepers IV");
}at first ,static-method can't transfer construct-method;the virtual can't recognize them for transfering each other,and static's prior higher than construct at second , if u want to test main ,and write printout static and construct ; u main-method should new book,through print result,u can find their prior