• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/16

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

16 Cards in this Set

  • Front
  • Back
Identifiers MUST start with what characters?
a letter
a currency character ($, euro, yen etc)
a connecting character (e.g. _)
Can an identifier start with a number?
No
What characters are valid in an identifier after the first character
no limitation
any combination of letters, numbers, currency characters or connecting characters
Is there a limit to the number of characters an identifier can contain?
No
what is the format of an octal literal?
A string of digits between 0 and 7, beginning with the digit 0
How many access modifiers are there, and what are their names?
public
protected
default (package)
private
What is the difference between protected access and default/package access?
Protected access allows (inheritence) access for member or methods to subclasses in ANY package
Default/Package access ONLY allows access (reference or inheritence) to classes or subclasses in the same package
Which of the following declarations are legal?

a) void doStuff(int x...){}
b) void doStuff(char...y, int x){}
c) void doStuff(int x, char... c){}
d) void doStuff(int x, float ...f){}
e) void doStuff(int...i, String...s){}
c) void doStuff(int x, char...c){}

The rules for var-arg declarations are:
1. The syntax for a var-arg declaration is type... varName (i.e. a valid type followed immediately by an ellipsis [...] followed by a variable name)
2. Only 1 var-arg parameter is permitted in a method signature
3. If a signature includes a var-arg it MUST be the last parameter in the signature
Which of the following modifiers are permitted on a constructor declaration?

public
protected
private
static
abstract
strictfp
synchronized
native
final
access modifiers (public, protected ..)
strictfp
synchronized
native
Is it legal to declare a constructor in an abstract class?
yes (check), but it isn't legal to call a constructor in an abstract class (an abstract class cannot be instantiated)
The constructor could only be called for a concrete class which extended the abstract class and provided implementations for any abstract methods
Is it possible to call a concrete method in an abstract class?
yes (as long as the method is static and called as a class method)
Where can an enum be defined?
1) Outside of all classes (in a class file with other classes)
2) As a class member (within a class, but outside of all methods)

Note: An enum cannot be defined within a method
What access modifiers are permitted with an enum definition?
public or default/package
What implicit modifiers are associated with ALL Interface constants?
public static final
Is it legal to define a class as abstract if it contains no abstract methods?
Yes
What modifiers are associated with all interface methods regardless of their signature?
public abstract