0
Usage on console window
Can't we use the console window to write in Java
4 ответов
+ 1
Try this out
System.out.println("Your Message");
0
You can get user input with the Scanner class:
Scanner scan = new Scanner(System.in);
This allows you to input text:
String text = scan.nextLine();
Now we gonna print out the text you entered:
System.out.println("My text: "+text);
And you also need to import the java.util package so you can use the Scanner class, so add this line to the top:
Import java.util.Scanner;
0
Hey JavaBobbo Do you know Duke?,
As in Duke the Java Mascot?
0
Hey, yes i know