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

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;

44 Cards in this Set

  • Front
  • Back

Object

An entity with states(fields) and behavior(shown via methods)

Class

blueprint for an object. contains fields and methods that describe the behavior of an object

Types a variables



Local - declared inside a method, destroyed when method is completed


Instance - declared inside a class, but outside any method


Class - declared inside of a class, static



Constructor

gets invoked when an object is created. sets state (fields) of object.

Static

Keyword. static variables can be called upon without an instance of its class being created. all instances of class share the same variable

Access modifier

sets access levels for classes, variables, methods, constructors. public, private, protected, default

Interface

An interface is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.




interfaces do not provide any implementation, they are only meant to be implemented. sets up a contract for a class to conform to

scope

refers to section of code where variable can be accessed


REFACTOR

Overriding

when a class has the same method as its parent class, but the method body is different.



Overloading

when methods are in the same class with the same name but take in different types and/or different number of argugments

reflection

code examining itself.

Encapsulation

hiding data


the technique of making the fields in a class private and providing access to the fields via public methods.

Nested Class

static inner class

Downcasting

when you treat a parent class as a child class


Animal animal = new Animal()

Super

keyword used to refer to the immediate parent class

primitive datatypes

int, byte, short, long, boolean, double, float, character.

Abstract class

keyword used to specify that a class should not be instantiated. it is only used to be extended by other classes




has no implementation

Argument

data item specified in a method call

array

A collection of data items, all of the same type.

casting

conversion from one datatype to another

Enumerated type

type whose legal values consist of a fixed set of constants

exception

an event during program execution that prevents the program from continuing normally

exception handling

a mechanism that handles exceptions to keep the program running normally

throw vs throws

throw is a keyword that allows the user to throw an exception.




throws is keyword used in a method declaration that specify which exceptions could be thrown

what is a checked exception

any exception that is caught by the compilerbefore run time.

Inheritance

when a sub class acquires the properties of its parent class


Is a relationship

Composition

When you put an object inside another object. Has a relationship

SOLID principles

5 principals of Object Oriented Design


Single responsibility - a class should only have one job


Open closed - a class should be https://www.google.com/search?client=ubuntu&channel=fs&q=are+exception+runtime+erroreasily extended without modifying the class itself


Liskov substitution - every subclass should be substitutable with there parent class


Interface segregation - a client should not be forced to use a method or interface they dont use


Dependency Inversion - allows for decoupling

variable

used to store and manipulate data

implicit conversion

compiler will automatically convert a type into a higher type


int > long

casting

manually converting one type to another type


(int) long

.this

used when refering to the current object, allows object to pass itself as a parameter

null

refers to an uncreated object

types of test

System - testing the application as a whole


aggregate - testing component (series of classes / methods)


unit - testing a single unit of functionality (single method / class with single responsibility)

test driven development

Software dev process of writing test before writing code. using test to help guide the design process

test structure

Given - establish the preconditions for the test


When - what is being tested


Then - checking the outcome

polymorphism

the ability of an object to take multiple forms

abstraction

technique of hiding implementation details from the user and only providing them with functionality

Wrapper class

used to convert a primitive type to a class

Boxing

converting a primitive to a class

Concurrency

multiple threads running at the same time working with the same resources

multithreading

enables complete use of cpu. when multiple threads run at the same time.

thread

a sequence of programmed instructions

process

an instance of a program. has memory and atleast one thread