0

How to display data from keyboard

to scan

26th Oct 2017, 11:35 PM
Yvan Ntwari
Yvan Ntwari - avatar
3 Réponses
+ 33
import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); System.out.println(sc.nextLine()); } } //hope it helps ☺
27th Oct 2017, 1:45 AM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 3
play with the code provided and blv me it will be more fun along with enhancing your knowledge and interest in such a beautiful language 😊
27th Oct 2017, 3:05 AM
Shivani Kataria
Shivani Kataria - avatar
+ 1
thank u it is really helpful
27th Oct 2017, 2:30 AM
Yvan Ntwari
Yvan Ntwari - avatar