Fixed the original error by adding = new int[20] to the end of private int[] array. This solved the error because i hadn't created the array itself or set a value for the size,
Type: Posts; User: Gambleee_
Fixed the original error by adding = new int[20] to the end of private int[] array. This solved the error because i hadn't created the array itself or set a value for the size,
Exception in thread "main" java.lang.NullPointerException
at Deb1.allocate(Deb1.java:20)
at TestDeb1.main(TestDeb1.java:12)
This may not be accurate as i removed some of the comments when...
Hi i'm new to Java, when running the following test class on deb1 i get a NullPointerException. Can someone explain how to fix my array?
Deb1:
public class Deb1
{
private int[]...