Little Help

Discussion in 'Programming General' started by wtp, May 2, 2011.

Little Help
  1. Unread #1 - May 2, 2011 at 4:53 PM
  2. wtp
    Joined:
    Nov 25, 2005
    Posts:
    2,455
    Referrals:
    2
    Sythe Gold:
    0

    wtp Grand Master
    Banned

    Little Help

    How do I make the char go to uppercase?

    Code:
    //Philip Rego
    //CSC 161 - 02
    //Lab 11D
    
    import java.util.Scanner;
    
    public class four
    {
    	static String input;
    	static int index;
    	static char temp;
    	static Scanner keyboard = new Scanner(System.in);
    
    	public static void main(String[] args)
    	{
    		System.out.println("Input a string.");
    			input = keyboard.next();
    
    		char [] list = input.toCharArray();
    
    
    		for(index = 0; index < list.length; index++)
    		{
    			temp = list[index];
    			System.out.print(temp.toUpperCase());
    		}
    
    	}
    }
    
     
  3. Unread #2 - May 2, 2011 at 8:38 PM
  4. Jimmy
    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

< GridWorld Help (Exam Pre-Test) | anyone do robot programming with C/C++? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site