CS1113_Homework 6 # 4

CS1113_Homework 6 # 4 - Example int stringLength =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 // Matt Hergenrether // Section 10 // CS 1113 // April 10, 2008 // Homework 6 # 4 // defining accessor and mutator methods. Accessor method: The purpose of an acessor method is to obtain information about an object.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Example. int stringLength = string.length() Mutator method: The purpose of a mutator method is to set a value to a variable. Example. public static void setText(String strText) { text = strText }...
View Full Document

Ask a homework question - tutors are online