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 many types of transactions are there in com + .net ?
What is the difference between boxing and unboxing?
Is .net an object oriented language? What are their components?
What does cil do?
Sql Queries: A Table will be given Omiting Duplicate rows and adding a new column
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
How can I get at the win32 api from a .net program?
How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?
Tell us what is the native image generator?
What are situations when you register .NET assembly in GAC ?
Explain .NET architecture?
What is "common language runtime" (clr) in .net?
Please explain is the jit an interpreter?
How to convert a .NET object into COM operabililty?
Explain what inheritance is, and why it's important?