Question: Need simple beginner java code that I can use to scan large file and print contents already have this code just need the piece to
Need simple beginner java code that I can use to scan large file and print contents already have this code just need the piece to scan and print remaining answer.:
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class homework
private String title;
private String author;
private int year;
private List tags;
public void BookString title, String author, int year, List tags
this.title title;
this.author author;
this.year year;
this.tags tags;
public String toString
return title by author year Tags: String.join tags;
public boolean equalsObject obj
if this obj return true;
if obj null getClass obj.getClass return false;
Book book Book obj;
return year book.year && title.equalsbooktitle && author.equalsbookauthor && tags.equalsbooktags;
public static List filterBooksByTagsList books, List inputTags
List filteredBooks new ArrayList;
for Book book : books
for String tag : book.tags
if inputTagscontainstag
filteredBooks.addbook;
break;
return filteredBooks;
import java.awt.print.Book;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class BookTagFinder
public static void mainString args
List books new ArrayList;
Scanner scanner new ScannerSystemin;
System.out.printlnEnter tags separated by commas:;
String input scanner.nextLine;
List inputTags List.ofinputsplit;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
