Chapt6 2

30 cards
Chapt6 2


Preview Flashcards

Front Back
data in an object are known as
procedures in an object are known as
an object created from a class is called an __________ of a class
class ___________ normally have methods that perform useful operations on their data
________ variables can only store data and have no methods
Each ______ of the class string contains different data
instance the instances aer all share the same design
each instance has all of the atributes and methods that were defined in the _______ class
string class
rectangle object will have the following fields
length width
Rectangle box = new Rectangle (); the box variable holds the ______ of the recangle object
methods that retrive the data of the fields are called
methods that modify the data of the fields are called
mutators setlength setwidth
each field that the programmer wishes to be viewed by other classes needs an ________
accessor getlength getwidth
each feild that the programer wishes to be modifed by other classes needs a
________ fields and ______ methods require an object to be created in order to be used
instance instance
classes can have special methods called
classes can have special methods called
a __________ is a method that is automatatically called when an object is created
________ are used to perform operations at the time an object is created
constructors typically ______ instance fields and perform other object initialization tasks
constructors have the same name as the _____
__________have no return types, not even void
constructors are typically private or public
______ variables can be declared with out being initialized rectangle box; this statement does not create a rectangle object. so it is an uninitialzed local _______ variable
when an object is created, its constructor is ______ called
if u do not write a constructor, java provides one when the class is compiled this is known as _____ it sets all the objects numeric fields to___ all boolean fields to _____ it sets all the objects reference variables to the special value ______
default constructor o false null
constructor that does not accept an argument is knwon as a
no arg constructor this is what the default constructor is
a string literal is used to initialze a string_________
a string literal is used to _____ a string object
initialize for instance string name= new String ("michal long"); string name= "michal long"
two or more methods in a class may have the same name as long as their _______ lists are diff.
a method ______ consisst of the methods name and the data types of the methods parameters, in the order they appear