Page 2 of 2 FirstFirst 12
Results 21 to 32 of 32

Thread: array list help

  1. #21
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,614
    Rep Power
    5

    Default Re: array list help

    I recommend you stay away from using single uppercase letters for any kind of field, variable, or class declaration. By convention, they are used to describe formal type parameters for generic types. For Name, just do something meaningful like:
    Java Code:
    Name name;
    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  2. #22
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,028
    Rep Power
    6

    Default Re: array list help

    Quote Originally Posted by jim829 View Post
    I recommend you stay away from using single uppercase letters for any kind of field, variable, or class declaration.
    99.9% agreed, but I'll be damned to use multi-character variable names for loop counters ;)

    Its all about code readability; descriptive naming is a big part of that. Your future self will thank you a lot for using them.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #23
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,614
    Rep Power
    5

    Default Re: array list help

    Quote Originally Posted by gimbal2 View Post
    99.9% agreed, but I'll be damned to use multi-character variable names for loop counters ;)
    That is certainly acceptable (note the "uppercase" caveat).

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  4. #24
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,028
    Rep Power
    6

    Default Re: array list help

    Quote Originally Posted by jim829 View Post
    That is certainly acceptable (note the "uppercase" caveat).
    We are in agreement then. Lets seal the deal - cut of your pinky finger.

    (Who said something about sensibility?)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #25
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: array list help

    Quote Originally Posted by gimbal2 View Post
    We are in agreement then. Lets seal the deal - cut of your pinky finger.

    (Who said something about sensibility?)
    Jeeez, now you agree to agree; what happened to all the fun in this world?

    kindest regards,

    Jos ;-)
    cenosillicaphobia: the fear for an empty beer glass

  6. #26
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,028
    Rep Power
    6

    Default Re: array list help

    Quote Originally Posted by JosAH View Post
    Jeeez, now you agree to agree; what happened to all the fun in this world?
    IT DOESN'T STOP BLEEDING! *runs around screaming*
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

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

    Default Re: array list help

    Quote Originally Posted by gimbal2 View Post
    IT DOESN'T STOP BLEEDING! *runs around screaming*
    Quick! Stick it up your nose!
    cenosillicaphobia: the fear for an empty beer glass

  8. #28
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,614
    Rep Power
    5

    Default Re: array list help

    Let me guess. You let Jos do the cutting. :)

    Regards,
    Jim
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  9. #29
    jim829 is online now Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,614
    Rep Power
    5

    Default Re: array list help

    Ah yes! From the "Advanced Medical Training Manual."
    The Java™ Tutorial | SSCCE | Java Naming Conventions
    Poor planning our your part does not constitute an emergency on my part.

  10. #30
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: array list help

    First I want to do some brain surgery ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #31
    gimbal2 is online now Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,028
    Rep Power
    6

    Default Re: array list help

    Quote Originally Posted by JosAH View Post
    First I want to do some brain surgery ...

    kind regards,

    Jos
    MY BRAIN HURTS! This is just my favorite one ever.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  12. #32
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default Re: array list help

    The BBC would like to apologize for the previous poster; it won't happen again and now the penguin on your televion will explode.

    kind regards,

    Jos (<-- slightly silly, 1204 points)
    cenosillicaphobia: the fear for an empty beer glass

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help with Array List
    By UnTil_Fate in forum New To Java
    Replies: 4
    Last Post: 01-26-2013, 03:30 PM
  2. Linked List, Array List time complexity
    By Rick99771977 in forum New To Java
    Replies: 4
    Last Post: 08-18-2011, 05:37 AM
  3. Replies: 2
    Last Post: 09-06-2010, 01:03 AM
  4. Array List
    By mashyum in forum Advanced Java
    Replies: 2
    Last Post: 07-28-2009, 06:47 AM
  5. Array List
    By mprentice84 in forum New To Java
    Replies: 2
    Last Post: 02-20-2009, 02:12 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
  •