How to get input in Java Input and Output (I/O) Java Console and File Input/Output how to display output in java in console
Output
System.out.println(“Here is Output”);
Input
try{
java.io.BufferedReader br= new java.io.BufferedReader(new java.io.InputStreamReader(System. in));
String s = br.readLine();
System.out.println(s);
}
catch(Exception e){
System.out.println(e.getMessage());
}
0 comments:
Post a Comment