For example I've
3 books:
Booknumber (int), Booktitle (string), Booklanguage (string), Bookprice (int).
now I want to have an array called books[3][4]
.
I'm gettin the data I set via setBooknumber like this:
Book1.getBooknumber(), Book1.getBooktitle(),...,Book3.getBookprice().
Now how do I realize this books[3][4] array
. I can't call it String books[][] = new String [3][4]
. Because I can't get Booknumber (int)
into it.
I don't want Booknumber to be String neither Bookprice. How do I realize it, please?
Now to further elaborate it.
I have 2 classes.
public class book{
String Booktitle, Booklanguage;
int Booknumber, Bookprice;
//constructor
//get
//set
}
and
public class bookUI
{
public static void main(String arg[])
{
book book1 = new book();
book book2 = new book();
book book3 = new book();
book1.setBooktitle();
...
book3.setBookprice();
//Here I want to have books[3][4] Array. And gettin the data via book1.get...book3.get into the array
}
}