Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void showAuthors(List<Message> messages, List<Authors> authors) {
- for (Message message : messages) {
- int authorId = message.getAuthorId();
- for (Authors author : authors) {
- if (author.getId() == authorId)
- authorName = author.getFullName();
- break;
- }
- System.out.println("Message id is " + message.getId() +
- " author is " + authorName);
- }
- }
Add Comment
Please, Sign In to add comment