Give an example program for Getter /read-only methods in JAVA
Read-only:
//A Read-only class in Java
public class Student{
//private data member
private String institute ="MKG";
//getter method for institute
public String getInstitute (){
return institute;
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
What is model-view -controller Architecture?
What is difference between system.string and system.stringbuilder classes?
What property do you have to set to tell the grid which page to go to when using the Pager object?
What are the new thee features of com+ services, which are not there in com (mts)?
what is the use of "mustinherit" keyword?
How viewstate is being formed and how it's stored on client in .net?
What?s SingleCall activation mode used for?
What is smart navigation?
What is the difference between a debug and release build?
When should I use .net core?
What is func in .net 3.5?
What are code contracts?