import java.util.Arrays;
public class Main {
public static void main(String[] args){
// simple class
class MyClass{
Integer x = 100;
// initialization constructor
...
Type: Posts; User: AngleWyrm
import java.util.Arrays;
public class Main {
public static void main(String[] args){
// simple class
class MyClass{
Integer x = 100;
// initialization constructor
...
Is it possible to override this behavior through the use of a default constructor?
I notice this behavior of array of myclass objects doesn't seem identical to the behavior of, say an array of booleans
boolean[] destinationBag;
// load a destination bag with second bag's...
Exception in thread "main" java.lang.NullPointerException at Main.main(Main.java:20)
Is there a line numbering feature for this forum's code boxes?
I'm also getting a runtime null pointer exception with this version when MyClass.set(int) is called, and I suspect it has to do with the creation of the array elements.
public class Main {public...