News:

Main Menu

Java Programmers?

Started by Doomsday, November 21, 2008, 11:35:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Doomsday

I'll be taking Java sometime in the near future, but I'm working on it now to get reacquainted to it. I worked on it in HS, so I could jump right in now without too much trouble, but I have ran into a little hiccup.

import java.util.Scanner;
public class tbh04_01 {

public static void main (String[] args) {

}

public static char upperCaseToLowerCase(char ch) {

Scanner scan = new Scanner(System.in);
System.out.print("Enter a character: ");
//ch = scan ???


return ch;
}
}


I know how to scan integers and strings and the like, but I completely forgot how to scan characters.

For example, to scan an integer, it would be number = scan.nextInt();

Any help is appreciated.

Vekseid

Just .next(), I believe?

Have not done serious Java work in ages, sorry.

Oniya

"Language was invented for one reason, boys - to woo women.~*~*~Don't think it's all been done before
And in that endeavor, laziness will not do." ~*~*~*~*~*~*~*~*~*~*~Don't think we're never gonna win this war
Robin Williams-Dead Poets Society ~*~*~*~*~*~*~*~*~*~*~*~*~*~Don't think your world's gonna fall apart
I do have a cause, though.  It's obscenity.  I'm for it.  - Tom Lehrer~*~All you need is your beautiful heart
O/O's Updated 5/11/21 - A/A's - Current Status! - Writing a novel - all draws for Fool of Fire up!
Requests updated March 17

Doomsday

I found my answer via Youtube, but thanks for all of your input.