//This is simple bean class, containing only one property name with its getters and setters method.
//This class contains one extra method named displayInfo() that prints the student name by the hello message.
package com.ashutoshjava;
public class Student {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void displayInfo(){
System.out.println("Hello: "+name);
}
}
Thanks,
Happy programming !
//This class contains one extra method named displayInfo() that prints the student name by the hello message.
package com.ashutoshjava;
public class Student {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void displayInfo(){
System.out.println("Hello: "+name);
}
}
Thanks,
Happy programming !
Superb explaining.. i used it for recalling all essential concepts.. Really appreciate and love the work..thank you
ReplyDeleteThanks for your positive and encouraging feedback.
ReplyDelete