Syvum Home Page

Home > Quiz Games > Java Programming >

Java Programming : Methods : True or False


Answer the following questions about methods in the Java programming language.

Formats Info Page Worksheet / Test Paper Quiz Review
Multiple choice

Your Performance  

1.

A static method can refer to any instance variable of the class.

  True

  False

 

2.

The return value from a method must always match the declared return type.

  True

  False

 

3.

When a method or a variable in a class is declared as private, it can only be accessed by the methods within the same class.

  True

  False

 

4.

All interface methods must be declared as public when implemented in a class.

  True

  False

 

5.

A method in a class declared as static can only access static class members.

  True

  False

 

6.

When an instance of a class, or object, is specified as a parameter to a method, a reference to the said object is passed to the method.

  True

  False

 

7.

A method that is overridden in the subclass must retain the same return type and parameter list.

  True

  False

 


 
12 more pages in Java Programming


Contact Info © 1999-2019 Syvum Technologies Inc. Privacy Policy Disclaimer and Copyright
Previous
-
Next
-