Your task is to create a program that can achieve the above requirements when given the students surname, first name and three digit postfix through CMD arguements
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
String S,F;
int num;
System.out.println("Input surname: ");
S=input.next();
System.out.println("Input first name: ");
F=input.next();
System.out.println("Input three digit postfix: ");
num=input.nextInt();
System.out.print("Entered details are: \n");
System.out.println("Surname: "+S);
System.out.println("First name: "+F);
System.out.println("Digit: "+num);
}
}
Comments