package day1.examples;
import java.util.*;
public class AdvancedInput {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char a,b;
System.out.println("Enter Your First Name");
a = sc.next().charAt(0);
System.out.println("Enter Your Last Name");
b = sc.next().charAt(0);
System.out.println("Your Full name is:");
System.out.println(a+b);
}
}
答案 0 :(得分:3)
这可以解决问题吗?
System.out.println("Your Full name is:");
System.out.println(a+" "+b);