Your questions sounds like a homework assignment. We're happy to help you understand how to do your homework, but we are not going to do your homework for you - because the purpose of homework is for you to learn something, and when someone else does the work for you, you will not learn anything.
So, please try to do the assignment yourself first. If you get stuck, then show us your code and explain exactly where you are stuck, and we'll help you get further with it.
Hi bhaargav patel,
I'm also a newbie. This is like Java heaven. Don't ask code pieces. Trust me, you don't get anything other than all ask you to try it first by yourself. I highly appreciate that, cos we beginners learn alot from it. Thanks for all senior people who share their knowledge to improve and maintain this awesome forum.
I agree with Jesper de Jong
OCAJP Java 8, OCPJP Java 8
No thanks. We have all the government we need. This tiny ad would like you to leave now:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop