0

How to get character input from user with using datainputstream class in java

How to get character input from user Using datainputstream class

29th May 2019, 9:40 AM
deep diver boy Ak
2 Réponses
0
Try using import java.util.Scanner; class accept{ Scanner read = new Scanner(System.in); String x = read.nextLine(); System.out.println("You just keyed in "+ x); }
8th Jun 2019, 8:42 AM
Charles Nduka
Charles Nduka - avatar
0
I have found the right answer correct answer is Scanner res=new Scanner(System.in); Char a; System.out.print(enter character); a=res.next().charAt(0); System.out.print("chracter is:--"+a);
8th Jun 2019, 9:46 AM
deep diver boy Ak