Click to See Complete Forum and Search --> : NullPointerException


saipkjai
07-22-2003, 04:50 AM
sorry to bother u guys again but....
I have the following code

public static void sortId() {
int passCount;
int placeCount;
int minIndex;

Video temp = new Video();
for(passCount = 0; passCount < videos.length ; passCount++){
minIndex = passCount;
for(placeCount = passCount + 1; placeCount < videos.length; placeCount++){
if((videos[placeCount].getVideoId()) < (videos[minIndex].getVideoId())){
minIndex = placeCount;
System.out.println(temp);
}
temp = videos[passCount];
System.out.println(temp);
videos[passCount] = videos[minIndex];
videos[minIndex] = temp;

}
}
}

videos is an array
but somehow when I run this method...it gives me NullPointerException...can someone help me plz....

ArchAngel
07-22-2003, 06:42 AM
Can you please post the stack trace.