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
What are the types of jit?
Tell me what is serialization?
What is a manifest in .net?
What is the need of OLE-automation?
Explain can the validation be done in the server side? Or this can be done only in the client side?
Please explain what garbage collection is and how it works. Provide a code example of how you can enforce garbage collection in .net?
What should you do to store an object in a viewstate?
What is UDDI and how to register the web service in it?
How do I use the thread pool?
Using com component in .net?
Explain me what is a design pattern and what is it for?
What is Polymorphism? How does VB.NET/C# achieve polymorphism?
How do you turn off cookies for one page in your site? Give an example.
Explain the difference between the stack and the heap?
How to view a .NET assembly?