• 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/23

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;

23 Cards in this Set

  • Front
  • Back
Three ways to access a method
Invoking a method of declared in the same class
Invoking a method using a reference of the class
Invoking an inherited method
Can a method declared private be inherited or overrated
No
What is the difference between protected and default members
A default member may be accessed only if the class accessing the member belongs to the same package. On the other hand I protect the member can accessed through inheritance by a subclass even if the subclass is in a different package
Name all non-access memember modifiers
Final
Abstract methods
Synchronized methods
Native methods
Strictfp methods
Declare all primitives and their bits
Byte 8
Short 16
Int 32
Long 64
Float 32
Long 64
Boolean
Char 16
Modifiers on variables and methods

There are no final objects, only final references

True

What can you mark static?

1. Methods


2. Variables


3. A nested class within another class but not within another method


4. Initialization methods

Identifiers guidelines

Begin with the letter, underscore or currency character


After first character digits


Any length

Method signature of Main

Public static void main(String [] args)

What access modifiers can be used with classes?

public or default

What does class visibility dictate?

1. Create an instance of another class


2. Extend another class


3. Access methods and variables of another class

Non access Class Modifiers

final, abstract, strictfp

When is a class marked abstract?

When a method or more are marked abstract

Interface method are always _____________ and ___________

Public and abstract

Can interfaces have instance variables?

Yes. As long as they are constants (public, static, final)

Methods and instance variables are called _________

Members

Determine __________ visibility before determining __________ visibility

Class before member

Three ways to spot an abstract methods

1. Ends in semicolon


2. Is marked abstract


3. No code inside

What's the signature of the main() method?

Public static void main(String [] args)

What are the two most common reasons to use inheritance?

1. Code re-use


2. Polymorphism

What non access modifiers keep a method from being overriden?

1. Final


2. Static

Name the 6 rules to overriding a method

1. Argument list must be exact match


2. Return type must be same or a subtype of original


3. Access level can ONLY be LESS restrictive


4. Unchecked exceptions are good, checked exceptions can't be different or broader


5. Can't override final method


6. Can't override static method