Results 1 to 2 of 2

Thread: Array issues

  1. #1
    Neo82 is offline Member
    Join Date
    Dec 2007
    Posts
    1
    Rep Power
    0

    Smile Array issues

    Hi folks

    I been doing some coding wth java (JDK) and I found this method inconvienient for an array of length 6:

    static void check(int z1,int z2,int z3,int z4,int z5,int z6,int pt1,int pt2,int size){
    boolean verify = ((pt2 <= z2 + 20) && (pt2 >= z2 - 20) && (pt1 <= z1 + 20) && (pt1 >= z1 - 20))
    || ((pt2 <= z4 + 20) && (pt2 >= z4 - 20) && (pt1 <= z3 + 20) && (pt1 >= z3 - 20))

    Continues to array 6
    Is there a quicker method in completing these calculations?

    Thanks

    Gregory

  2. #2
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    You're writing custom code logic, which is dependent on the coder's plan(you). What exactly are you trying to accomplish... ? besides writing a calculation boolean variable?

Similar Threads

  1. Array traversal issues
    By sondratheloser in forum New To Java
    Replies: 3
    Last Post: 08-13-2012, 01:49 AM
  2. iterator issues
    By orchid in forum New To Java
    Replies: 2
    Last Post: 08-12-2008, 02:43 PM
  3. Issues with Jva I.O
    By Annatar01 in forum New To Java
    Replies: 0
    Last Post: 02-08-2008, 02:16 AM
  4. Issues with a while loop
    By Lang in forum New To Java
    Replies: 4
    Last Post: 11-09-2007, 10:01 PM
  5. jcheckbox issues need help. thanks.
    By carlos123 in forum New To Java
    Replies: 3
    Last Post: 11-05-2007, 11:37 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
  •