Reputation: 501
Is it possible to add C++ like input (i.e. without using Scanners or anything; just plain single statement input like "cin>>") in Java using some library or anything?
Upvotes: 0
Views: 616
Reputation: 10249
No. It's not that easy because Java does not support operator overload
you can create a Scanner object
Scanner scan = new Scanner(System.in);
and read the user input with
String s = scan.readLine();
Upvotes: 2
Reputation: 73548
You can't have operator overloading and Scanner is in the standard library.
Upvotes: 0