Search:

Type: Posts; User: AngleWyrm

Search: Search took 0.09 seconds.

  1. Re: Please help me to find out the error in the following code

    import java.util.Arrays;

    public class Main {
    public static void main(String[] args){

    // simple class
    class MyClass{
    Integer x = 100;
    // initialization constructor
    ...
  2. Re: Please help me to find out the error in the following code

    Is it possible to override this behavior through the use of a default constructor?
  3. Re: Please help me to find out the error in the following code

    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...
  4. Re: Please help me to find out the error in the following code

    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?
  5. Re: Please help me to find out the error in the following code

    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...
Results 1 to 5 of 5