Issue with Java - odd even letters

I am working on a way of trying to get the output from user input, to just show odd numbers or even numbers if the first CharAt(0) = 'w', as an example.

Does it work by "System.out.println(CharAt(0) + CharAt(2) + CharAt(4))"

Am working on using the Scanner project to get user input and already have the following input part:

Scanner input = new Scanner(;

System.out.print("Please enter a uncoded string: ");

String first = input.nextLine();


if (first.charAt(0) == 'u') {

first = first.toUpperCase();

} else if (first.charAt(0) == 'l') {

first = first.toLowerCase();

} else if (first.charAt(0) == 'o') {


Read More »

By: StackOverFlow - Tuesday, 20 November

Related Posts