You are either not logged in or not registered with our community. Click here to register.
 
November 24, 2017, 06:33:07 PM

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Click here if you are having problems.
Default Wide Screen Beige Lilac Rainbow Black & Blue October Send us your theme!

Wiki Blogs Dicebot

Author Topic: Java Programmers?  (Read 512 times)

0 Members and 1 Guest are viewing this topic.

Offline DoomsdayTopic starter

Java Programmers?
« on: November 21, 2008, 11:35:00 AM »
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.

Code: [Select]
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.

Offline Vekseid

Re: Java Programmers?
« Reply #1 on: November 21, 2008, 11:40:31 AM »
Just .next(), I believe?

Have not done serious Java work in ages, sorry.

Offline Oniya

Re: Java Programmers?
« Reply #2 on: November 21, 2008, 11:47:41 AM »

Offline DoomsdayTopic starter

Re: Java Programmers?
« Reply #3 on: November 22, 2008, 12:11:40 AM »
I found my answer via Youtube, but thanks for all of your input.