Give an example program for Getter /read-only methods in JAVA
Answer Posted / hrindows@gmail.com
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 |
Post New Answer View All Answers
How will you load an assembly which is not referenced by current assembly?
What are situations when you register .NET assembly in GAC ?
Explain clr, cts and cls?
Explain what is the difference between web application and enterprise application?
Can you write a class without specifying namespace?
What is the purpose of IClonable interface in .NET?
What is a windows process in .net?
What is il in vb.net?
What is lazy initialization?
Explain what inheritance is, and why it's important?
What are Attributes in .NET?
How many types of generations are there in a garbage collector?
State some of the different languages supported by .net?
How many types of transactions are there in com + .net ?
What is the use of gacutil.exe?