Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

optimize the following code

 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below given code prints the following output:

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





Can you help to remove those nested redundant while loops?? I guess they are causing bottleneck.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12185
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried? What worked? What didn't?

We're not really going to do it for you...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic