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 is class library in .net
What is heap and what is stack?
What is namespaces in .net?
Is .net core managed code?
Explain the different types of proxy patterns?
What is Entity Relationship Model in .NET?
What is the root class in .net?
Who is using .net core?
What is Full trust permission set in .Net
What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?
A developer company sends dlls to the client. Some client is not happy current functionality, so request some modification. Developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?
What is an exe and a dll?
How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?
Explain about the Common Language Runtime?
What is delegation in .net?