Posts
- Get link
- X
- Other Apps
public class student { static String k1="MIT"; int roll_no; String name; String f_name; void display(){ System.out.println(roll_no+" "+name+" "+f_name); } public static void main(String[] args) { student a1=new student(); student a2=new student(); a1.roll_no=12; a1.name="ijaz"; a1.f_name="frhan"; a2.roll_no=12; a2.name="saeed"; a2.f_name="raeed"; a1.display(); a2.display(); } }