File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Queue" Watch "Queue" New topic
Author

Queue

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


size() = 0


I had given over there size 2 in constructor, but couldn't figure out what's the exact use of that constructor.


My one regret in life is that I am not someone else.
- Woody Allen
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Capacity isn't size.


luck, db
There are no new questions, but there may be new answers.
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Darryl Burke wrote:Capacity isn't size.


Yes sorry it's capacity, but what's exact use of that capacity ? even if i gave there capacity 2, i can add more elements than 2 or less element than 2.
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

I found similar thread.Thanks
http://www.coderanch.com/t/473803/java-programmer-SCJP/certification/Usage-Capacity-parameter-PriorityQueue
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Queue