Week 3 Flashcards
One reason Java is known as an extensible language
You can declare new classes as needed
Each class declaration that begins with the access modifier ______ must be stored in a file that has the same name as the class, and ends with the .java file extension
public
Every class declaration contains the keyword _____ followed immediately by the classes name
class
_____, _______ and ________ names are identifiers
class, method, and variable
An object has attributes implemented as ________ variables that are carried with it throughout its lifetime
instance
Instance variables exist ______ methods are called on an object, while the methods are _________, and after the methods complete _________
before, executing, execution
In other words instance variables exist before during after a method is called on an object
In relation to classes and methods, where are instance variables declared?
Inside a class, outside the bodies of the methods
Each object (instance) of the class has its ___ ____ of each of the class’ instance variables
own copy
Instance variables should be listed ____ in the body of the class
first
What can access members of a class that are declared private?
The public methods of the class
Parameters are declared in a _____-_________ parameter list, which is inside the parentheses following the method name
comma-separated
Every parameter must specify a ____ followed by a ________ name
type, variable name
Vars declared in the body of a particular method are _____ variables
local
When a method terminates, what happens to the values of the local variables?
They’re lost
What keyword is used if a method will not return any information?
Void