answersLogoWhite

0

A setter is used to change a field; a getter to get its value. The fields themselves are usually declared as private, for reasons that can be summarized with the term "encapsulation".

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What are Java beans?

In eclipse you can create java bean by generating getters and setters. Getters and setters are generated as ' alt + shift + s + r'.


What are setters and getters?

As the name suggest Setters are to set value of an attribute and Getters are to get value of an attribute. sometime they are also called java beans.


What is getters in java?

GETters and SETters are functions that GET and SET the value of a private variable.example:.........private int power;// -----------------------......................................................... // |.......................................................... // |........................................................... // |........................................................... // | The User Gets The value of power.......................................................... // |public int getPower(){ //...................... |return power;//


What is the difference between Java bean and bean?

JAVA beans and coffee beans are two very different things . JAVA beans are used to generate getters and setters. while coffee beans are use to make coffee.


How do you create a bean in Java?

In eclipse java beans can be created by using getters and setters. Example: public class Login { public String lmail; public String getLmail() { return lmail; } public void setLmail(String lmail) { this.lmail = lmail; }


Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.


What technologies link to Java?

Java is exclusive to surfing the web. Some web sites use Java to embed videos, others use Java for advertisements.


What you use in case of pointer in java?

Java does not have pointers


Does Java Script use the same compiler as Java?

No


What is java 7?

Java 7 is the most current version of Java. Many movies and games use Java.


What method in java performs some action (i.e. not assignments) other than returning a value?

Methods that are neither mutators (setters) or accessors (getters). This primarily includes the class constructors (the initialisers) and the class destructor (the restorer).


Which is the best Book to understand JAVA in short?

You can use Head First Java or Java Complete Reference to learn Java.