0

Syntax to print the given msg & get the input

30th Dec 2016, 6:03 AM
S.Archana
S.Archana - avatar
1 Odpowiedź
+ 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); } }
30th Dec 2016, 7:04 AM
visph
visph - avatar