- 3

Input and output

How to cout and cin in Java?

7th Dec 2019, 11:30 PM
Ấłī Řễdấ Ấłī
Ấłī Řễdấ Ấłī - avatar
2 Answers
+ 2
There is no cin and cout in Java. You can use Scanner class to get inputs and to print you can use System.out.print() or System.out.println().
7th Dec 2019, 11:55 PM
A͢J - avatar
- 1
cout and cin are C++ I/O formatting. for Java, cout is System.out.print("Hello"); and cin is Scanner in = new Scanner(); int a = in.nextInt();
8th Dec 2019, 6:55 AM
Rohit Kh
Rohit Kh - avatar