ArrayIndexOutofBounds Exception

import jss2.*;

public class HrdCdPass_container2

{

final static int NUM_PASSWORDS = 3;

public static void main (String[] args)

{

String[] passw = new String[NUM_PASSWORDS];

passw[0]= "hello";

passw[1] = "stuff";

passw[2]= "fineme";

Password2 pass;

LinkedQueue<Password2> passwordQueue = new LinkedQueue<Password2>();

for (int count=0; count <= NUM_PASSWORDS; count++)

{

passwordQueue.enqueue(new Password2(passw[count]));

System.out.println(passw[count]);

}

int dunnoyet = 3;

while (!(passwordQueue.isEmpty()))

{

for (int count=0; count <= dunnoyet; count ++)

{

if (!(passwordQueue.isEmpty()))

{

pass = passwordQueue.dequeue();

if (pass.getAdminPass() != pass.getLimPass() || pass.getAdminPass()

!= pass.getPass() || pass.getLimPass() != pass.getPass())

System.out.println("These are the passwords you may choose now: "

+pass.getAllPass());

}

}

}

}

}

I keep on getting the error and I dont know why..... can someone help me out please?

[1165 byte] By [nvaughna] at [2007-11-27 9:25:29]
# 1
Because you check if count is smaller than or equal to 3. Arrays are indexed from 0, as you seem to already know. When you hit 3, you're addressing the 4th - non-existent - element of a 3 element array
georgemca at 2007-7-12 22:22:07 > top of Java-index,Java Essentials,Java Programming...
# 2
for (int count=0; count <= dunnoyet; count ++)That looks fishy.
CaptainMorgan08a at 2007-7-12 22:22:07 > top of Java-index,Java Essentials,Java Programming...
# 3
ohhh! thanks! I really appreciate it...
nvaughna at 2007-7-12 22:22:07 > top of Java-index,Java Essentials,Java Programming...