I don't want you nice guys to waste your too much of your time, and confused me in the process.
I am hoping you can explain it to me like I am 2 years old, that's it.
Hoping to get a handle on why am I getting this error "Class or interface expected error"
If you could point me to it it, ramble if you have to so I may get it, I think that'll help; of course if you want to just tell me the answer, know what I mean, hey I cannot stop you:-)
But seriously now, I do not know why I cannot modify this simple code:
Anyway, when I run, and the error pops up, there's nothing I can do but stare at it. I am not frustrated yet, but I haven't got a sense why it would do this.
I think as I said if you go so far as comparing apples to apples it should eventually sink in:-)
Thanks for your help!
I am hoping you can explain it to me like I am 2 years old, that's it.
Hoping to get a handle on why am I getting this error "Class or interface expected error"
If you could point me to it it, ramble if you have to so I may get it, I think that'll help; of course if you want to just tell me the answer, know what I mean, hey I cannot stop you:-)
But seriously now, I do not know why I cannot modify this simple code:
Code:
public class Book
{
//
private String author;
// …………….
private String title;
// …………….
private Int pages;
}
/**
* Create ……………………..
* ……………………….
* …………………………
* BELOW IS OUR CONTRUCTOR METHOD
* Line below is the line HIGHLIGHTED, in the program
*/
[B]public Book(Sring bookAuthor, String bookTitle)[/B]
{
author = bookAuthor;
title = bookTitle;
}
public Book(Int bookPages)
{
pages = bookPages;
}
/**
* Return ………………..
* BELOW IS OUR ASSESSOR
*/
public String getAuthor()
{
return Author;
}
/**
* Return …………………..
* …………………..
*/
/**
* ……………………….
* BELOW IS OUR ASSESSOR
*/
public String getTitle()
{
return Title;
}
/**
* WE HOPE TO PRINT
*/
public void printAuthor()
{
// Simulate the printing of an Author.
System.out.println("##################");
System.out.println("# The Author of this book is:");
System.out.println("# Author");
System.out.println("# " + author + " extraordinaire.");
System.out.println("##################");
System.out.println();
}
I think as I said if you go so far as comparing apples to apples it should eventually sink in:-)
Thanks for your help!
Comment