We have a policy here called DoYourOwnHomework. We are glad to help, but we won't do the work for you. So let me ask where are you confused? What do you know about the problem/questions? What do you think the answers are?
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
Even though the thread title is not at all helpful, I hope you don't really mean that is the first thing you have written, being expected to know what is on the stack. Please find the code button because it makes your posting easier to read.
What result did you obtain? Have you worked out why?
Joined: Feb 17, 2010
ok thanks 4 the "nice comment",,i find the answer already,,,
There is a reason why we don't give straight answers here on JavaRanch - it's because we are here to help you learn Java. You learn most by thinking about a problem yourself and finding out the answer yourself. We're happy to give you hints, but you won't learn a lot if we'd just give you the answer. See the page DoYourOwnHomework in our FAQ for more about this.
It would work much better if you'd show us what you've done yourself already and ask specific questions about where you get stuck, instead of posting your assignment here without showing that you thought about the problem yourself.