Answers for "java prompt name"

1

java prompt name

public class Main {
  public static void main(String[] args) {
    var scanner = new java.util.Scanner(System.in);
    System.out.print("What is your name? ");
    var name = scanner.nextLine();
    System.out.println("Hello " + name + "!"):
  }
}
Posted by: Guest on January-25-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language