Final answer:
The required Java method takes a Scanner object, prompts the user for their first and last names, and prints out the full name using two separate prompts.
Step-by-step explanation:
To write a method in Java that takes a Scanner object as a parameter accepts two inputs (first name and last name), and prints out the full name, you would do something like this:
import java.util.Scanner;
public class FullNamePrinter {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
printFullName(scanner);
}
public static void printFullName(Scanner scanner) {
System.out.print("Enter your first name: ");
String firstName = scanner.nextLine();
System.out.print("Enter your last name: ");
String lastName = scanner.nextLine();
System.out.println("Your full name is " + firstName + " " + lastName);
}
}
When executed, this code prompts the user twice, first for their first name and then for their last name, before concatenating and printing the full name to the console.