Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Suppose I've chocolates. I need to put them in boxes. But in a box I can put only 5 chocolates. So I need to fix the size of box as 5. It means no more than 5 chocolates should be in a box. How can I fix that box size?

What I have tried:

I tried using linked list, queue. But I couldn't get that. Can anyone suggest me how to do that? Help would be appreciated.
Posted

 
Share this answer
 
Looks to me, you are learning Java.
Advice: don't try to start by doing useful things.
Read documentation, follow tutorials, follow examples. They are not to do something useful, they are here to teach you the language.

The way to handle the 5 depend on what you want to do with it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900