Java Program on How to Implement Class and Object

Get Job-ready: Java Course with 45+ Real-time Projects! - Learn Java

Program 1

class Test
{
    public static void main(String args[])
   {
           Myclass M1=new Myclass();
           M1.display();   
             new Myclass().display();
  }
}

 

If you are Happy with DataFlair, do not forget to make us happy with your positive feedback on Google

courses

Leave a Reply

Your email address will not be published. Required fields are marked *