Home TechnologyProgrammingJava Subscribe to RSS

In How Many Ways We Can Create Object For A Class With Examples?

Answer Question

1 Answer - Sort by: Date | Rating

    Example of creating object or instance:

    Class Ex1{
    //statements
    }

    class mainclass{
    public static void main(String[]ar){
    //Style1
    Ex1 obj1;
    Obj=new Ex1;

    //Style2
    Ex1 Obj2=new Ex1;
    }
    }
    1 0

    Alon_nad 

    answered 3 months ago

      Answer Question - Answers are editable for 5 min.

      If you do not Sign-in or Register your answers will

      be anonymous, your answers may also be

      checked before going online.

      0

      More

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International