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 to customize the trace output?
What is meant by globalization?
How to create properties and methods using controls?
Which namespace is require to used XML in .NET?
What is SOAP? How you will do windows and forms authentication?
What are the new 2.0 features useful for?
What is "common language specification" (cls) in .net?
How many types of transactions are there in com + .net ?
Please explain what is the difference between odbc and ado?
What is a strong name in .net?
What is DTS and explain the purpose of it?
What are the differences between com architecture and.net architecture?
How will you do redo and undo in textbox control?
What is the native image generator?
What is garbage collection and how it works ?