Results 1 to 5 of 5

Thread: quick question

  1. #1
    vouslavous is offline Member
    Join Date
    Apr 2009
    Posts
    11
    Rep Power
    0

    Default quick question

    how to get an int that corresponds to the number of characters in a textfield

    for example if a text field had the word "hello" in it how would i get an int that would return 5 for the number of letters.

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default

    Since you're working with a string wouldn't the .length() method work?

    String length() method (Java Platform SE 6)

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    vouslavous is offline Member
    Join Date
    Apr 2009
    Posts
    11
    Rep Power
    0

    Default

    yea that should work

  4. #4
    rexicon is offline Member
    Join Date
    Apr 2009
    Posts
    10
    Rep Power
    0

    Default

    Should do it

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    AR

    Trying to get post count up high enough to post links?
    Last edited by Fubarable; 04-24-2009 at 08:42 PM.

Similar Threads

  1. Hello everyone! quick question.
    By irishhokie in forum New To Java
    Replies: 5
    Last Post: 04-03-2009, 04:13 AM
  2. One last quick question
    By jigglywiggly in forum New To Java
    Replies: 7
    Last Post: 01-26-2009, 08:53 AM
  3. Quick Question
    By Graeme in forum New To Java
    Replies: 4
    Last Post: 01-08-2009, 08:01 PM
  4. Quick Question
    By Spenc in forum New To Java
    Replies: 3
    Last Post: 09-22-2008, 02:26 PM
  5. Quick question about sorting
    By nbd223 in forum New To Java
    Replies: 10
    Last Post: 04-28-2008, 09:11 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
  •