1. Variables

  1. What is the difference between an instance variable and a class variable?

    How are they accessed?

  2. What kind of variable would be used for a constant (such as the weight of an object)?

    Where and how are these type of variables declared?

  3. What kind of variable would be used for a varying amount (such as the exchange rate from Australian to US dollars)?

    Where and how are these type of variables declared?

  4. What kind of variable would be used for a loop counter?

    Where and how are these type of variables declared?

  5. Why should you write:

    int[] a;
    

    rather than (as many texts do):

    int a[];
    
2. Methods

  1. What is the difference between an instance method and a class method?

    How are they accessed?

  2. What do the access modifiers public, protected, (package), and private mean?
  3. What is meant by each part of the statement:

    public static void main(String[] args)
    
  4. What kind of "thing" is each part of the statement:

    System.out.println(myObject);
    

    How does it work?

3. Logic

Which of the following are equivalent?

if (!A && !B) instructionBlock1;
else instructionBlock2;

if (!A || !B) instructionBlock2;
else instructionBlock1;

if (!A || !B) instructionBlock1;
else instructionBlock2;

if (!(A || B)) instructionBlock1;
else instructionBlock2;

if (!(A || B)) instructionBlock2;
else instructionBlock1;

if (!(A && B)) instructionBlock1;
else instructionBlock2;

if (!(A && B)) instructionBlock2;
else instructionBlock1;
4. Packages

  1. What is a package?
  2. What is meant by the statement:

    import java.io.*;
    
5. Exceptions

  1. What is the difference between a checked exception and an unchecked exception?
  2. What options exist for dealing with exceptions?

6. Interfaces

  1. What is the difference between an interface and an abstract class?
  2. What differences are there between implementing an interface and extending an abstract class?