Advertisement
Md_hosen_zisad

student information java

Mar 5th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. package pucc;
  2.  
  3. public class student{
  4.     String name;
  5.     int id;
  6.     double cgpa;
  7.     student(String n,int i,double d)
  8.     {
  9.         name=n;
  10.         id=i;
  11.        cgpa=d;
  12.    
  13.     }
  14.    
  15.     public static void main(String[] args) {
  16.         // TODO Auto-generated method stub
  17.         System.out.println("hello world");
  18.         int a=2,b=3,c;
  19.         c=a+b;
  20.     student sudip;
  21.     sudip=new student("sudip",1311,3.5);
  22.     System.out.println(sudip.name);
  23.     System.out.println(sudip.id);
  24.     System.out.println(sudip.cgpa);
  25.    
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement