?
Solved

finding size

Posted on 2002-05-08
2
Medium Priority
?
197 Views
Last Modified: 2011-09-20

if you take a look at my last question you will get a better understanding!

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=java&qid=20298016

how could i find out how many documents their is in the queue?

what is the total size of the queue?

cheers
0
Comment
Question by:penfold69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 360 total points
ID: 6996801
   Hi!

  You could do something like this
         
         public int displayAll()
         {
              int iCount = 0;
              QueueNode temp = new QueueNode();
             
              temp = start;
              while (temp !=null)
              {
                   if(temp.DocumentName != ""){
                      iCount++;
                   }
                   temp = temp.next;
              }
             return iCount;
         }    

   Regards,
     Tomas Helgi
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 6996807
Hi!

I didn't change the function name :(
It should be more describeing like

public int getDocumentCount(){
....
}

Regards,
  Tomas Helgi
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question