Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int booksOver4(Book[] books) {
- int count = 0;
- for (int i = 0; i < books.length; i++) {
- if (books[i].getRating() > 4) {
- System.out.println(books[i].getTitle());
- count++;
- }
- }
- return count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement