Using ArrayLists. Very Very new to Java.

I'm very very new Java, I have no idea how to do anything but I have a project due so I really need some help!
my project is to create an arraylist of favourite items(class) named favouriteshows(I'm doing my favourite shows).
private ArrayList<FavouriteItems> myfavouriteshows;
I need to be able to find items of rating and string description but so far this is what I have, if anyone could give me some help, that would be great. This is my code so far for finding an item with searched rating;
/**
* Count the number of Items with a given rating
* @return The number of Items (Item objects)
* whose rating is rating (could be 0).
* If the rating parameter is outside the valid
* range 1..5 then print an error message and return 0.
*/public int numberOfItemsOfRating(int rating)
{
if(rating <= 5 || rating >= 1 ){
int index = 0;
boolean searching = true;
while(searching && index < myfavouriteshows.size()){
FavouriteItems intrating = myfavouriteshows.get(index);
if(myfavouriteshows.getRating() == rating){
searching = false;
}
else{
index++;
}
if(searching){
return null;
}
}

- Again, this may be very primitive code to some people but I'm a slow learning new starter!

Re: Using ArrayLists. Very Very new to Java.

Yeah but now you have to SET your favorite items for the array list. 0, 1, 2, 3, 4, 5 is how an array list starts, so you would need to assign a favorite item to 0, 1, 2, 3, 4, and 5. I am unclear as to what you are actually trying to accomplish, or if I am telling you the correct way, I would wait for a more experienced user to help.