Answer to Question #241214 in Java | JSP | JSF for Nguu

Question #241214

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

1
Expert's answer
2021-09-23T17:46:28-0400
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		String surname;
		String firstname;
		int digit;
		System.out.println("Enter surname: ");
		surname=in.next();
		System.out.println("Enter first name: ");
		firstname=in.next();
		System.out.println("Enter three digit postfix: ");
		digit=in.nextInt();
		
		System.out.println("Surname: "+surname);
		System.out.println("First name: "+firstname);
		System.out.println("Digit: "+digit);
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS