Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 27 of 27

Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

  1. #26
    Junior Member
    Join Date
    Feb 2013
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

    Quote Originally Posted by Norm View Post
    Use the elements from the array like in post#12 and not the variable that the user's input is being read into.

    Look at how to use arrays: Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)
    i really can't make it work ( sample codes please (((

    --- Update ---

    Quote Originally Posted by Norm View Post
    Use the elements from the array like in post#12 and not the variable that the user's input is being read into.

    Look at how to use arrays: Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)
    i really can't make it work ( sample codes please (((

  2. #27
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

    from post#12
          	abc[x]=Integer.parseInt(br.readLine());  // Save value in an array element
     
       ....
           	if(abc[x]%2==1)   // test the value of an array element
    If you don't understand my answer, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. need help with loops and codes..
    By akocnivek in forum Loops & Control Statements
    Replies: 1
    Last Post: October 19th, 2012, 02:02 AM
  2. Help me please with my codes
    By sara92 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 12th, 2012, 11:52 AM
  3. Looking for help on two codes:
    By captianjaax in forum What's Wrong With My Code?
    Replies: 24
    Last Post: September 20th, 2011, 11:49 PM
  4. Please Help What's Wrong with my Codes!
    By bertzki10 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 25th, 2011, 11:03 AM
  5. Accessing Arrays all At Once HELP
    By scottgilliland2003 in forum Member Introductions
    Replies: 0
    Last Post: December 13th, 2010, 10:25 AM