Give an example program for Getter /read-only methods in JAVA
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 |
What are the main components in .net?
What is interface and abstract class in .net?
Explain me difference between public and static modifiers?
Should I implement finalize on my class? Should I implement idisposable?
Dot Net is Platform Independent or Platform Dependent..?
WHAT IS .net
Explain difference between panel and groupbox classes using .net?
Explain the difference between constants and read-only variables?
Explain the Difference between value and reference type.
ctype(123.34,integer) - should it throw an error? Why or why not?
How many types of generations are there in a garbage collector?
How can you automatically generate interface for the remotable object in .NET with Microsoft tools?