1. Create method in FinalExamDriver class that will receive an arrayList of Driver objects 2. Inside the...
Question:
1. Create method in FinalExamDriver class that will receive an arrayList of Driver objects
2. Inside the method create new instance of File and pass Vehicles.txt for name
3. Inside the method create new instance of PrintWriter with objectReferenceVariable/Identifier called writer and pass file
4. Create loop that will go through each Driver object and using getters to get required info below
4a. Inside same loop Use writer to print a new line FirstName:LastName:VehiceType
5. Add these two specific lines of codes after the for loop:
LocalDateTime localDateTime = LocalDateTime.now();
writer.println(localDateTime);
5a. Make sure to
import java.time.LocalDateTime;
6. Make sure to close writer and add any imports or any method exceptions as needed
7. Invoke this method from method main