Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package student;
- public class Student {
- String name,dept;
- int id;
- Student(String n,String d,int i){
- name = n;
- dept = d;
- id = i;
- }
- void info(){
- System.out.println("Name = "+name);
- System.out.println("Dep = "+dept);
- System.out.println("Id = "+id);
- }
- public static void main(String[] args) {
- Student s1 = new Student("Ashik", "CSE", 120);
- s1.info();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement