Exception Handling and Parameterized Polymorphism
1. Consider a class Book with private instance variables title and author, and a parameterized constructor that takes two parameters t and a to initialize title and author, respectively. Which of the following code snippets correctly creates an object of the Book class with the title "The Catcher in the Rye" and author "J.D. Salinger"?
2. Consider a class Person with private instance variables name and age, and a parameterized constructor that takes two parameters n and a to initialize name and age, respectively. Which of the following code snippets correctly creates an array of three Person objects, with the names "Alice", "Bob", and "Charlie", and the ages 25, 30, and 35, respectively?
3. You are developing a class to manage a collection of items, and you want to ensure type safety while allowing flexibility for different item types. Which of the following is the most appropriate way to define a generic class Box that can hold any type of object?
4. You need to write a utility method that can print elements of any List to the console.
Question: Which of the following method signatures correctly utilizes generics and wildcards to achieve this, allowing lists of any type to be passed as an argument?