Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help2200


This forum is provided to promote discussion amongst students enrolled in Data Structures and Algorithms (CITS2200).
 
Options:
RSS cloud
Jump to:

lab 3 Null exception in submission

5 of 418 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Thu 26th Mar, 8:01am
Actions: 
        Login-to-reply

 

Hi,

I got Null exception problem in cssubmit?
What should I do?

Thanks,

lab 3 Null exception in submission

photo
From: Ethan P.
Date: Thu 26th Mar, 10:13am
Actions: 
        Login-to-reply

 

NullPointerException is thrown when a program attempts to use an object reference 
that has the null value. 

You haven't given a lot of information on the problem, so it's difficult to say what 
to do or where the problem is in the code.

lab 3 Null exception in submission

photo
From: James A.
Date: Thu 26th Mar, 10:18am
Actions: 
        Login-to-reply

 

When any exception gets thrown in CSSubmit like this, it should print out a few lines describing the "stack trace", i.e. what the code was doing at the moment the exception was thrown. That should guide you towards where to look in your code for a fix.

lab 3 Null exception in submission

photo
From: Tristan W.
Date: Mon 30th Mar, 3:49pm
Actions: 
        Login-to-reply

 

"James Arcus" <21*5*9*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> When any exception gets thrown in CSSubmit like this, it should print out a few lines describing the "stack trace", i.e. what the code was doing at the moment the exception was thrown. That should guide you towards where to look in your code for a fix.


Hey did you manage to find a solution for this? I am not sure why the the pointers are not being initialised. 

/**
	* initialise a new queue
	* @pa*am size the size of the queue
	*/
	public DequeCyclic (int size) {
	items = new Object[size+1];
	first = 0;
	last = size;
	}

lab 3 Null exception in submission

photo
From: ANONYMOUS
Date: Wed 1st Apr, 10:01am
Actions: 
        Login-to-reply

 

The code you have posted is not likely to be the bit at fault.

As James said, you should post the stack trace from cssubmit for more certain info. Without that stack trace it is not really possible to guess what your error is.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020