• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Queue

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

size() = 0


I had given over there size 2 in constructor, but couldn't figure out what's the exact use of that constructor.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Capacity isn't size.
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found similar thread.Thanks
http://www.coderanch.com/t/473803/java-programmer-SCJP/certification/Usage-Capacity-parameter-PriorityQueue
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic