Answers for "read console input java"

6

java taking console input

String str = System.console().readLine();
Posted by: Guest on April-01-2020
2

java text ouput to console

System.out.println("Hello world!"); 
//This will be printed out to the console and requires no imports.
Posted by: Guest on May-03-2020
1

java read console

public static void main(String[] args) throws IOException {
        
        BufferedReader reader = new BufferedReader(
            new InputStreamReader(System.in));
 
        String name = reader.readLine();
 
        System.out.println(name);
}
Posted by: Guest on September-03-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language