Computer Science Canada How to input a char in java? |
Author: | abogaida [ Thu Apr 02, 2009 11:25 am ] |
Post subject: | How to input a char in java? |
Hello, i was wondering about the input of (Char) in java using the Scanner method? |
Author: | andrew. [ Thu Apr 02, 2009 2:30 pm ] |
Post subject: | RE:How to input a char in java? |
This should be in the Java section, but it's basically something like this: - You create your scanner (Scanner sc = new Scanner (System.in); ) - Then you create your char and give it the value of the first character from the input (char ch = sc.nextLine().charAt(0); ) |
Author: | abogaida [ Thu Apr 02, 2009 4:17 pm ] |
Post subject: | RE:How to input a char in java? |
I'm sorry but I tried to write in the java section but its telling me that the addition of a new post is limited to certain users. |