Solved

finding size

Posted on 2002-05-08
2
172 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
  • 2
2 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 90 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

808 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