Java canot find symbol class
i have create 2 class
this is the first class
public class Book{
private String BookTitle;
private String BookAuthor;
private int yearPublished;
public Book(String Title, String Author, int yr){
BookTitle = Title;
BookAuthor = Author;
yearPublished = yr;
}
public String getTitle(){
return BookTitle;
}
public String getAuthor(){
return BookAuthor;
}
public int getyr(){
return yearPublished;
}
public void setTitle(String Title){
this.BookTitle = Title;
}
public void setAuthor(String Author){
this.BookAuthor = Author;
}
public void setyr(int yr){
this.yearPublished = yr;
}
public void printDetails(){
System.out.println("Title:\t" + BookTitle);
System.out.println("Author:\t" + BookAuthor);
System.out.println("YearPublished:\t" + yearPublished);
}
}
and second class
public class Catalogue {
private Book[] bookarray;
private int i = 0,count;
public Catalogue(){
bookarray = new Book[10];
bookarray[0] = new Book("Title: Absolute Java(Second Edition)\nAuthor: Walter Salvitch\nYear: 2006");
bookarray[1] = new Book("Title: Computer(Tools for an information age)\nAuthor: H.L Capron and J.A Johnson\nYear: 2004");
bookarray[2] = new Book("Title: Jursssic Park\nAuthor: Michael Crichton\nYear: 1991");
count = getBookSize();
}
public int getBookSize(){
while (bookarray != null){
i++;
}
return i;
}
public Book[] getBook(){
return bookarray;
}
public void addBook(String Title, String Author, int yr){
for(int j = 0; j <= getBookSize()-1; j++){
bookarray[getBookSize()] = new Book(Title, Author,yr);
}
}
//public int printCatalogue(){
//return printDetails;
//}
}
when i compile second class it give error " can not find symbol constructor Book(java.lang.String)

