Syntax
import java.*;
import java.io.*;

 class Student11{  
     int id;  
     String name;  
       
     Student11(int i,String n){  
     id = i;  
     name = n;  
     }  
     void display(){System.out.println(id+" "+name);}  
     public static void main(String args[]){  
        Student11 s1 = new Student11(111,"Karan");  
     Student11 s2 = new Student11(222,"Aryan");  
     s1.display();  
     s2.display();  
 }  
}

OUTPUT

ID : 101 Name : pratik
ID : 102 Name : badala
See How to Implement This Program :
please Subscribed this tutorial to : Click here

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA