wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes this question quite math - -' (simple java condition) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "this question quite math - - Watch "this question quite math - - New topic
Author

this question quite math - -' (simple java condition)

Thanaphorn Thongthien
Greenhorn

Joined: Aug 03, 2010
Posts: 15
i need the results of specific index which is the last value that need to show and use to calculate next... example like results below

i only need the red result

-----------------------------------------------
value compare:: widthCut 53.00and jobWidthMulti 5.00
indexJobWidth ----1
value compare:: widthCut 53.00and jobWidthMulti 10.00
indexJobWidth ----2
value compare:: widthCut 53.00and jobWidthMulti 15.00
indexJobWidth ----3
value compare:: widthCut 53.00and jobWidthMulti 20.00
indexJobWidth ----4
value compare:: widthCut 53.00and jobWidthMulti 25.00
indexJobWidth ----5
value compare:: widthCut 53.00and jobWidthMulti 30.00
indexJobWidth ----6
value compare:: widthCut 53.00and jobWidthMulti 35.00
indexJobWidth ----7
value compare:: widthCut 53.00and jobWidthMulti 40.00
indexJobWidth ----8
value compare:: widthCut 53.00and jobWidthMulti 45.00
indexJobWidth ----9
value compare:: widthCut 53.00and jobWidthMulti 50.00
indexJobWidth ----10

================================================================
value compare:: widthCut 35.00and jobWidthMulti 5.00
indexJobWidth ----1
value compare:: widthCut 35.00and jobWidthMulti 10.00
indexJobWidth ----2
value compare:: widthCut 35.00and jobWidthMulti 15.00
indexJobWidth ----3
value compare:: widthCut 35.00and jobWidthMulti 20.00
indexJobWidth ----4
value compare:: widthCut 35.00and jobWidthMulti 25.00
indexJobWidth ----5
value compare:: widthCut 35.00and jobWidthMulti 30.00
indexJobWidth ----6
value compare:: widthCut 35.00and jobWidthMulti 35.00
indexJobWidth ----6

================================================================

and this is my code.....




how can i solve it to get and show only last value ? i need help - -'

ps. actually the widthCut[] and lengthCut require to query from database << but i cann't do it !! T_T
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18997
    
  40


One possible option... Remove the printf() calls. And replace it with assignments (to some results variable) that will save the data needed for the print out. And right after the loop, do the printf() based on the results variable.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Thanaphorn Thongthien
Greenhorn

Joined: Aug 03, 2010
Posts: 15
...thank you so much for reply me

and actually there have more than 30 expected result set

but thank you by the way
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: this question quite math - -' (simple java condition)