Give an example program for Getter /read-only methods in JAVA



Give an example program for Getter /read-only methods in JAVA..

Answer / 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

More Dot Net General Interview Questions

How ccw (com callable wrapper) and rcw (runtime callable wrappers) works?

0 Answers  


What is the use of Treeview control?

0 Answers   CGI,


Explain the differences between server-side code and client-side code.

0 Answers  


What is Application Domain?

1 Answers  


Explain the use of activex control in .net?

0 Answers  






How Can Creating Installation Components in .Net?

1 Answers  


How to Exchange data between Webservices

2 Answers  


i had attended to infosys interview on 17th april 2010...on .net..3+ experience for Technology Analyst .. to my knowledge i did well in technical and hr whether i loose the interview or still processing is taking place..am confused please. what accuatly would be happend?

0 Answers  


What is delegation in .net?

0 Answers  


Types of evidence in .net with context to CAS

0 Answers  


How to load the contents of an xml file into an xmldocument object?

0 Answers  


What are the new thee features of com+ services, which are not there in com (mts)?

0 Answers  


Categories