Site icon DataFlair

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();
  }
}

 

Exit mobile version