This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes optimize the following code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "optimize the following code" Watch "optimize the following code" New topic
Author

optimize the following code

Sandeep Bhandari
Ranch Hand

Joined: Apr 16, 2004
Posts: 201
Below given code prints the following output:

**
****
******
********





Can you help to remove those nested redundant while loops?? I guess they are causing bottleneck.


SCJP 96% | SCWCD 90%| SCJP mock exams | My SCJP blog
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11257
    
  16

What have you tried? What worked? What didn't?

We're not really going to do it for you...


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
wood burning stoves
 
subject: optimize the following code