PRACTICE SOLUTIONS GRADED A+
● instance. Answer: Memory space for a(n) _____ variable is created
when the object is instantiated from a class.
● static methods can access _______ fields, but not _________fields..
Answer: Static, instance
● Instance methods can access __________ fields and
__________fields.. Answer: instance, static
● this. Answer: Java reserved word that allows an object to refer to itself
within a method.
● Aggregation. Answer:
● Abstract method. Answer: a method in a java interface definition that
does NOT have to have a body.
● A class can implement __________ interface(s). Answer: multiple
, ● When a class implements an interface that contains an abstract
method, .... Answer: ...the class must include the header and body of the
method.
● What is true about a java interface?. Answer: An interface cannot be
instantiated.
One or more interfaces are listed in the implements clause.
● The comparable interface contains_________. Answer: only
compareTo method.
● Method overloading. Answer:
● A class can implement the __________ interface to define the natural
ordering of its objects.. Answer: Comparable
● In a class, a service method should be declared as _________.
Answer: public
● -. Answer: The sign in front of public members of classes.
● +. Answer: The sign in front of private members of classes.