Uppercase string
807601Apr 5 2008 — edited Apr 5 2008Hey guys, I'm very new to java.
I'm running into a problem while trying to create a string that changes to uppercase when using the .toUppercase method.
This is my code:
import java.util.Scanner;
public class StringMutations {
public static void main(String[] args)
{
Scanner sc;
String test;
sc = new Scanner(System.in);
System.out.print("Enter string: ");
test = sc.nextLine();
test = test.toUppercase();
System.out.println(test);
}
}
If someone could help me out it would be MUCH appreciated.