Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
U

User 11064514

@User 11064514
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Running Java Code Errors: Console Output Result Termination
    U User 11064514

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

    Java help java learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups