Results 1 to 4 of 4
  1. #1
    doa24uk is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default Get Characted at Array Position?

    Hi all,

    This is what I've got

    Java Code:
    // IV
    private final char[] LETTER_ARRAY = {'a','b','c','d'};
    
        public StringToCharArray()
        {
            // Also tried getChar(LETTER_ARRAY,1)
            System.out.println(get(LETTER_ARRAY,1));
        }
    Am I even close!? This should print b.

  2. #2
    doa24uk is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default

    arrghhh NVM, I've had a long morning!

    Solution:

    Java Code:
            System.out.println(LETTER_ARRAY[1]);

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,776
    Blog Entries
    7
    Rep Power
    21

    Default

    nevermind; the OP found it him/herself.

    kind regards,

    Jos
    Last edited by JosAH; 04-20-2011 at 08:33 AM. Reason: see body of reply
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

Similar Threads

  1. Getting window position
    By bison in forum New To Java
    Replies: 3
    Last Post: 11-23-2010, 02:01 AM
  2. exchange the position of array elements
    By hacikho in forum New To Java
    Replies: 6
    Last Post: 09-20-2009, 11:02 PM
  3. get position in string from caret position
    By helloworld111 in forum AWT / Swing
    Replies: 5
    Last Post: 02-19-2009, 02:36 AM
  4. BorderFactory to set position?
    By aleplgr in forum AWT / Swing
    Replies: 2
    Last Post: 01-30-2008, 01:46 PM
  5. Help with position in java
    By fernando in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 08:54 PM

Posting Permissions

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