Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How many types of transactions are there in com + .net ?

1073


What is the difference between boxing and unboxing?

965


Is .net an object oriented language? What are their components?

943


What does cil do?

1003


Sql Queries: A Table will be given Omiting Duplicate rows and adding a new column

2381


What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

988


How can I get at the win32 api from a .net program?

1000


How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?

1000


Tell us what is the native image generator?

1147


What are situations when you register .NET assembly in GAC ?

1077


Explain .NET architecture?

1119


What is "common language runtime" (clr) in .net?

1065


Please explain is the jit an interpreter?

1152


How to convert a .NET object into COM operabililty?

1036


Explain what inheritance is, and why it's important?

972