Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Software (https://www.askmehelpdesk.com/forumdisplay.php?f=394)
-   -   Java static... please anybody explain this code to me. (https://www.askmehelpdesk.com/showthread.php?t=768336)

  • Sep 22, 2013, 09:19 PM
    chamal_anjana
    java static... please anybody explain this code to me.
    class Test{

    Test(int I){
    System.out.println("Test(" +i +")");
    }
    }

    class Q12{

    static Test t1 = new Test(1);
    Test t2 = new Test(2);
    static Test t3 = new Test(3);

    public static void main(String[] args){
    Q12 Q = new Q12();
    }
    }

  • All times are GMT -7. The time now is 10:59 PM.