Using a 2D Array in a Class Object - NullPointerException?

yea … it makes sense.

Currently, you have declared the two arrays as global members, this is fine since you want to use them in your method.

Your issue is you are declaring them again in the constructor, this is not allowed. Just allocate them here.

tldr … remove the declarations in your constructor.