Go Back   Java Programming Forums > Java Standard Edition Programming Help > Object Oriented Programming


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-11-2009, 01:02 AM
Junior Member
 

Join Date: Nov 2009
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
ssmith is on a distinguished road
Default What is the matching mutator method?

If private String employeeName is an instance variable of a class, write the matching mutator method for it.



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 04-11-2009, 02:03 AM
helloworld922's Avatar
Super Moderator
 

Join Date: Jun 2009
Posts: 1,347
Thanks: 5
Thanked 285 Times in 257 Posts
helloworld922 will become famous soon enoughhelloworld922 will become famous soon enoughhelloworld922 will become famous soon enough
Default Re: What is the matching mutator method?

A mutator method is a method that changes a variable inside a class (generally private or protected variables). While technically mutators can change the variables in any way, in general I believe this type of question is refering to a specific type of mutator called a "setter". Setters are exactly like what their name states: the set the value of a variable.

Java Code
public void setEmployeeName(String newName)
{
     this.employeeName = newName;
}
__________________
ASCII a question .. Get an ANSI

Please surround your code with [highlight=Java]code goes here[/highlight].
Reply With Quote
The Following User Says Thank You to helloworld922 For This Useful Post:
ssmith (04-11-2009)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with CoinCounter method abielm_007 Java Theory & Questions 2 03-01-2010 05:19 PM
Any way to map method calls? Swiftslide Collections and Generics 1 21-09-2009 09:37 AM
[SOLVED] Declare a method mohsendeveloper Object Oriented Programming 4 11-06-2009 08:18 AM
matches() method is not available in Jbuilder4 sah Java IDEs 1 30-12-2008 11:30 AM


100 most searched terms
Search Cloud
actionlistener actionlistener in java addactionlistener addactionlister arraylist value into hash buffered read two integer value in java cannot find symbol method create an abstract class called shape with abstract methods+java double to integer in java double to integer java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread main java.lang.outofmemoryerror java heap space in eclipse format double java get mouse position java how to convert list to map in java how to format doubles in java how to make a calculator in jframe using jcreator http://www.javaprogrammingforums.com/collections-generics/2688-grade-array-trouble.html http://www.javaprogrammingforums.com/object-oriented-programming/3713-limiting-decimal-places-double.html iphone java java actionlistener java cos java deallocate java double format java double to int java font attributes java format double java forum java forums java get mouse position java heap size exception java jbutton java nextline() java program to find dimensions of a room java programming codes using astirisks java programming forums java.lang.outofmemoryerror: java heap space java.lang.reflect.invocationtargetexception jbutton actionlistener jbutton with key enter jtable questions in java jtext bold jtextarea font kilowatts java program mean value decimal double java oops java assignments programmer forum smack api messagelistener two dimensional arraylist in java

All times are GMT. The time now is 09:07 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.