Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process Why setter and getter methods
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Rajendra
Why setter and getter methods
1 Answer(s)      5 years ago
Posted in : Development process



Advertisement
View Answers

November 30, 2009 at 4:54 PM


Hi Friend,

Getter and setter methods are used to retrieve and manipulate private variables in a different class. The getter methods retrieves the attribute of the same name and setter methods allows you to set the value of the attribute.

Thanks


Related Tutorials/Questions & Answers:
Why setter and getter methods - Development process
Why setter and getter methods  Every field has setter and getter methods.what is happening in this methods.  Hi Friend, Getter... in a different class. The getter methods retrieves the attribute of the same name and setter
why and where we use setter and getter methods in java, please give me one example program.....
why and where we use setter and getter methods in java, please give me one example program.....  why and where we use setter and getter methods in java, please give me one example program
Advertisements
Why doesn't Java allow overriding of static methods?
Why doesn't Java allow overriding of static methods?  Why doesn't Java allow overriding of static methods
why we use constructors instead of methods in java?
why we use constructors instead of methods in java?   why we use constructors instead of methods in java
Struts Login Validation. In This code setter of login page is called only one time again it doesnt call it. Why..?
Struts Login Validation. In This code setter of login page is called only one time again it doesnt call it. Why..?  **struts.xml** <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software
Java Swing Set And Get Values
and get values using setter and getter methods. This example explains you how... and their setter and getter methods and a display method which displays the short..., add1, add2, cityName, pincode and their setter and getter methods
Setter injection in Spring
Setter injection in Spring  What is Setter injection in Spring ?   The Spring IoC container supports setter injection, which is the preferred method of dependency injection in Spring. Setter injection uses the set
could not find a getter for id in contact class
could not find a getter for id in contact class   could not find a getter for id in contact class
methods
methods  PrintStream class has two formatting methods,what
methods
methods  PrintStream class has two formatting methods,what
methods
methods  PrintStream class has two formatting methods,what
hibernate pojo setter method problem
hibernate pojo setter method problem  how to pass a date type variable to a setter method in hibernate pojo class? //this is my pojo class import java.util.*; public class Employee { private String empname; private int
why we use struts framework instead of springs
and extendible with Plugins like Convention Plugin REST Plugin getter/setter...why we use struts framework instead of springs  why we use struts framework instead of springs    It depends upon your application
Spring Setter Injection
Basic Setter Injection Here in this example you will see another different type of injection known as setter injection which is the preferred method dependency injection in Spring. The convention of writing the setter method
static methods
static methods  why static methods cannot read or write the instance variables
<jsp:useBean> in JSP
:useBean>. Bean is a reusable component which mostly contains the setter and getter values, we also called it as mutators. The <jsp:useBean> is a standard
Agile methods
Agile methods   Why use Agile methods?   This methods focus on shorter iterations, in which the software is brought to a releasable level of quality fairly often, usually somewhere between weekly and monthly. Short
Why spring?
Why spring?  Why do we need to learn Spring? and where can we use it thanks
Why Abstract Class?
Why Abstract Class?  What is the use of Abstract Class if it has Zero Abstract methods
Why Abstract Class?
Why Abstract Class?  What is the use of Abstract Class if it has Zero Abstract methods
Why NSMutableDictionary
Why NSMutableDictionary  Why NSMutableDictionary is used for?   NSMutableDictionary inherits from NSDictionary class, which is used to manage mutable associations of keys and values. Actually, NSMutableDictionary
Methods of HttpServlet
Methods of HttpServlet  What are methods of HttpServlet
Why request.getParameter(
Why request.getParameter(  Hi all, I want to to do upload file in my folder and that time i want to store date in my MySQL Database. Here...="POST"> why it happen? Anybody plz help me.. i want use it my project...plz
why this can't
why this can't  import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3=new int[3][3][3
Why this is not working...?
Why this is not working...?  import java.util.*; public class Family { int size_of_family=0; public Person[] members=new Person[size_of_family]; Person d = new Person(); public Family (int size_of_family){ members = new
native methods
native methods  what is native methods in java?   A native method is a method that is implemented in a language other than Java. The Java native method is a great way to gain and merge the power of C or C++ programming
why jre in jdk
why jre in jdk  why jre in jdk
Why is super.super.method(); not allowed in Java?
Why is super.super.method(); not allowed in Java?  Why is super.super.method(); not allowed in Java
why using static keyword
why using static keyword  why using static keyword
why the php is open source?
why the php is open source?  why the php is open source
Why it called Struts?
Why it called Struts?  Why it called Struts
Advertisements
 

 

 

DMCA.com