class test { int roll_no; //instance_variable } class instance_variable { public static void main(String a[]) { test obj1= new test(); //create object of test class test obj2= new test(); obj1.roll_no=10; obj2.roll_no=20; System.out.println("roll_no of object1="+obj1.roll_no); System.out.println("roll_no of object2="+obj2.roll_no); } }
17 October, 2020
This Is The Newest Post
PREVIOUS ARTICLE
Previous Post
This Is The Newest Post
PREVIOUS ARTICLE
Previous Post