Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2007, 07:42 PM
Member
 
Join Date: Dec 2007
Posts: 1
Rep Power: 0
Neo82 is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 12-31-2007, 04:22 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 838
Rep Power: 4
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
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?
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
iterator issues orchid New To Java 2 08-12-2008 02:43 PM
Issues with Jva I.O Annatar01 New To Java 0 02-08-2008 02:16 AM
Array traversal issues sondratheloser New To Java 1 12-11-2007 08:55 PM
Issues with a while loop Lang New To Java 4 11-09-2007 10:01 PM
jcheckbox issues need help. thanks. carlos123 New To Java 3 11-05-2007 11:37 PM


All times are GMT +2. The time now is 03:58 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org