0
Syntax to print the given msg & get the input
1 Antwort
+ 2
import java.util.Scanner;
class msgIO {
public static void main(String args[]) {
String resp;
String msg = "This is a text to display...";
Scanner input = new Scanner(System.in);
System.out.println(msg);
System.out.println("Please type something:");
resp = input.nextLine();
System.out.println("You entered: "+resp);
}
}