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 Book(String 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 equals(Object obj){
if (this == obj) return true;
if (obj == null || getClass()!= obj.getClass()) return false;
Book book =(Book) obj;
return year == book.year && title.equals(book.title) && author.equals(book.author) && tags.equals(book.tags);
}
public static List filterBooksByTags(List books, List inputTags){
List filteredBooks = new ArrayList>();
for (Book book : books){
for (String tag : book.tags){
if (inputTags.contains(tag)){
filteredBooks.add(book);
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 main(String[] args){
List books = new ArrayList>();
Scanner scanner = new Scanner(System.in);
System.out.println("Enter tags (separated by commas):");
String input = scanner.nextLine();
List inputTags = List.of(input.split(","));
}
}
Need simple beginner java code that I can use to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!