Results 1 to 3 of 3
  1. #1
    ala_mages is offline Member
    Join Date
    Nov 2010
    Location
    Greece-Athens
    Posts
    13
    Rep Power
    0

    Question Check uppercase or lowercase letter

    Hi guys!;) Is there a way so i can find if a string starts with an uppercase letter or a lowercase letter? For example : String temp = "Hello" can i find if it starts with an uppercase or a lowercase:confused: .i have a program in which i save variables(i read them from a txt ex math x,y,z) in a vector as Strings with the first letter(first char) lowercase and i save the stables(ex George, Human ) as Strings with a first letter uppercase.after i save the Stables and the variables(they are all mixed up in the txt)in a vector can i separate them by checking the first letter(by using a method?)?? in order to find if a String is Stable or if a String is variable:rolleyes:. thanks!!:D

  2. #2
    ala_mages is offline Member
    Join Date
    Nov 2010
    Location
    Greece-Athens
    Posts
    13
    Rep Power
    0

    Default

    ok problem solved!! i found someone's else thread with a similar problem.

  3. #3
    ala_mages is offline Member
    Join Date
    Nov 2010
    Location
    Greece-Athens
    Posts
    13
    Rep Power
    0

    Default

    with this method i solved my problem. Thanks guys!!

    public boolean isStable(String word)
    {
    char[] charArray;
    charArray = word.toCharArray();
    if (Character.isUpperCase(charArray[0]))
    return true;
    else
    return false;
    }

Similar Threads

  1. ArrayList<String> convert to lowercase
    By s_mehdi76 in forum New To Java
    Replies: 3
    Last Post: 10-30-2010, 05:33 PM
  2. uppercase and lowercase please help
    By cuziwow in forum New To Java
    Replies: 4
    Last Post: 04-11-2010, 07:54 AM
  3. Need Help for this problem Uppercase.
    By ezered in forum New To Java
    Replies: 5
    Last Post: 12-04-2009, 12:05 AM
  4. UpperCase problem
    By logieen in forum New To Java
    Replies: 1
    Last Post: 08-03-2008, 11:26 PM
  5. String uppercase/lowercase
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-19-2007, 09:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •