java prompt name code example
Example: 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 + "!"):
}
}