Anne Saizan

Ranch Hand
+ Follow
since May 07, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anne Saizan

Okay thanks.
=)
12 years ago
Hello there,
I really need you guys help.
I've got this problem



I don't know what is the error with for each loop.
it does not display anything in the box.
Hope you guys can guide me.

Thanks
12 years ago
thank you so much guys.=)
12 years ago
oky thanks.
I will try it.
Thanks =)
12 years ago
oky, I want to list all the books.
when I do
System.out.println(bookList);
Output:
@1513

So, how I want to make sure that the array is added in the arrayList?
12 years ago
Thanks for reply.


12 years ago
Hello,
I just want to know how to use arraylist in Java.
What I mean is, if I have 2 class(Book, and main class).
How to use the arraylist to construct new book?
Thank you
12 years ago
Okay I understand that. Thank you for helping =)
12 years ago
Matthew, when I change to listBook.
The same error occurred.
12 years ago
owh sorry for that. This is the latest code:

I've got problem to pass two parameters in searchBook() method when I want to invoke that method here:




12 years ago
Thanks Matthew it's working now.But there's an error when I tried to pass the parameter to searchBook() method.


Thanks Rameshwar for the responds. But the code is not completed yet. I'm still working on it.
12 years ago
okay thanks. If I delete the BookList class, and alter the variables, the error is still the same.
12 years ago
here is my code:

12 years ago

Thanks for reply.
if I want to use BookList.length here:



why I've got the error BookList
length can't be resolve or it's not a field.?
12 years ago
Hello ,

I want to ask about the length of the array.

//create new object
Book[] BookList = new Book[MAX_SIZE];

//constructing 5 book object
BookList[0]= new Book("Absolute Java","Savitch",5,true);
BookList[1] = new Book("JAVA: How to Program","Deitel and Deitel",0,true);
BookList[2] = new Book("Computing Concepts with JAVA 3 Essentials","Horstman",5,false);
BookList[3] = new Book("Java Software Solution","Lewis and Loftus",5,false);
BookList[4] = new Book("Java Program Design","Cohoon and davidson",1,true);

why I can't use BookList.length?
12 years ago