Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package springpractice;
- public class oop1 {
- public static class teacher{
- String name;
- String phone;
- String gender;
- public void ds(String name){
- System.out.println(name);
- }
- void display(){
- System.out.println(name);
- System.out.println(gender);
- System.out.println(phone);
- }
- }
- public static void main(String[] args) {
- teacher tc=new teacher();
- tc.gender="Male";
- tc.name="Dr.Md.Kamal Pasha";
- tc.phone="0178723456";
- tc.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement