Input and output
How to cout and cin in Java?
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().
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();