• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Puzzle 4

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i have a question on this code.

Help me guys to understand it clearly thanks.
 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@ryan

1) Whenever you have a new question, then start a new thread i.e. a new topic. But if your doubt is regarding the same concept which an earlier topic had then you can continue in that topic.
Since here you are having a new code, i request you to start a new topic.

2) Whenever you are posting any code here, first press the "code" button which you can see when you are posting a question. After pressing the code button paste your code between the code tags. You are pretty new so this happens.

3) As far as your current code is concerned, i can see 2 problems

i)

See you have written x = x 6

ii) After the class name you have put brackets (parenthesis) i.e.


So correct them.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ryan almadin wrote:Hi i have a question on this code...


Ryan,

Please UseCodeTags (←click) when you are posting code. I've edited yours this time, and see how much better it looks?.
Please read this page thoroughly before you post again, because one of your lines was far too long. I broke it up for you.

Thanks.

Winston
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ryan almadin wrote:Help me guys to understand it clearly thanks.


We can't help you to understand it clearly unless you post a clear question.

What exactly is it you don't understand about it now?

Winston

PS: I suggest you have a look at the HowToAskQuestionsOnJavaRanch (←click) page.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you mean how does the puzzle work? What you need to do is to get a pencil and paper and write down the values of all the variables during each iteration of the loop. Then you can see how it works. Note many of these puzzles have little twists in, which are intended to confuse you, so you must be careful.
 
ryan almadin
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sheriff i understand now the Puzzle and i solve it clearly last 2 days thats correct have a little twist but i careful to understand so im happy i solve the problem im study now HFJ @dot com class and im very glad to be part in this family ranch because you guys help me understanding the java and helping me some of my question to @soni and @Gutkowski apologies me on my mistake . thanks
 
Rameshwar Soni
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ryan almadin wrote: i understand now the Puzzle and i solve it clearly



Congrats!!!
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done
Keep reading, and you will be better able to help the next person who has difficulty with such a puzzle.
 
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic