s
Edited by GenghisKhan2, 22 April 2018 - 09:10 PM.
You probably forgot to instantiate the objects you create (use the keyword "new").
Example of the use of the keyword "new" :
public class A{
//attributes
//constructor
Public A(){...}
//methods
}
public class MAIN{
public static void main(String args[]){
A a = new A();
//rest of the code
}
}
Nota Bene :
If you use arrays in your code, you must do the same manipulation, declaring them isn't enough, you should instatiate them.
private int[] myArray = new int[Constant] //Constant is an integer already defined (The length of the table). ex : 10.
Edited by FranckCastle, 05 May 2019 - 11:42 AM.
Users browsing this thread: