- 5
2nd Jun 2017, 11:06 PM
Jefferson Castro Arias
Jefferson Castro Arias - avatar
8 Answers
+ 8
What language do you use?
2nd Jun 2017, 11:20 PM
êč€ì •ì œ(Legacy)
êč€ì •ì œ(Legacy) - avatar
+ 8
What do you mean read characters? Read from what? Do you want to get input from users?
2nd Jun 2017, 11:28 PM
êč€ì •ì œ(Legacy)
êč€ì •ì œ(Legacy) - avatar
+ 3
import java.util.Scanner; Scanner scan= new Scanner(System.in); That makes a scanner, the use it like String name=scan.nextLine(); int age=scan.nextInt(); There are different types as you can see. I read that you shouldn't use the same scanner for both Strings and integers.
2nd Jun 2017, 11:48 PM
LordHill
LordHill - avatar
+ 3
Or as a method, because I am bored String name; public static String input(String x){ Scanner scan = new Scanner(System.in); System.out.println(x); return scan.nextLine(); } name=input("Enter Your Name - "); System.out.println("Your Name Is " + name);
2nd Jun 2017, 11:59 PM
LordHill
LordHill - avatar
+ 2
what is your question ..
2nd Jun 2017, 11:10 PM
Noor Nizar
Noor Nizar - avatar
+ 1
How I can read characters?
2nd Jun 2017, 11:11 PM
Jefferson Castro Arias
Jefferson Castro Arias - avatar
+ 1
I'm using Java
2nd Jun 2017, 11:21 PM
Jefferson Castro Arias
Jefferson Castro Arias - avatar
3rd Jun 2017, 12:45 AM
Rrestoring faith
Rrestoring faith - avatar