Kamrul13981

q5

Mar 2nd, 2021
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1.  
  2. package quiz1;
  3.  
  4. class Sujon {
  5.     String name;
  6.     int id, age;
  7.     String birth_date;
  8.     Sujon(String name, int id, int age, String bdate){
  9.         this.name = name;
  10.         this.id = id;
  11.         this.age = age;
  12.         this.birth_date = birth_date;
  13.     }
  14.    
  15.     void printInfo(){
  16.         System.out.println("Name: "+name);
  17.         System.out.println("ID: "+id);
  18.         System.out.println("Age: "+age);
  19.         System.out.println("Birthdate: "+birth_date);
  20.     }
  21.  
  22. }
  23. public class Quiz1 {
  24.  Sujon info = new Sujon("Md. Kamrul Hasan", 2011513981, 20, "25 May 2000");
  25.         info.printInfo();
  26.    
  27.     public static void main(String[] args) {
  28.      
  29.     }
  30.    
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment