Section 1

Preview this deck

catch

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (57)

Section 1

(50 cards)

catch

Front

1) Executes statements if a specific type of exception is thrown by a try block

Back

final

Front

1) As class modifier: cannot be subclassed 2) As method modifier: cannot be overridden 3) As variable modifier: can occur at most once as a left-hand expression on an executed command Note: All methods in a final class are implicitly final

Back

for

Front

1) Creates a for loop with initialization, condition, and incrementation statements 2) Creates an enhanced for loop with an iterable object

Back

new

Front

1) Creates an instance of a class or array object

Back

default

Front

1) Executes a block of statements if no case matches the specified value in a switch statement 2) Declares default values in a Java annotation 3) Allows an interface to provide an implementation of a method

Back

enum

Front

1) Declares a variable to be one of a set of predefined constants

Back

float

Front

1) Declares a field capable of holding a 32-bit single precision floating-point number 2) Declares that a method returns a value of the primitive type float

Back

int

Front

1) Declares a primitive field that holds a 32-bit signed two's complement integer (0 by default) 2) Declares that a method returns a value of the primitive type int.

Back

short

Front

1) Declares a primitive field that holds a 16-bit signed two's complement integer (0 by default) 2) Declares that a method returns a value of the primitive type short.

Back

protected

Front

1) Declares that a method, field, or inner class can only be accessed by other members of their own class, subclasses of their own class, or classes from the same package

Back

goto

Front

Reserved keyword but not used

Back

volatile

Front

1) Declares that a static variable can be modified asynchronously by concurrently running threads

Back

void

Front

1) Declares that a method does not return a value

Back

class

Front

1) Defines the implementation of a particular kind of object. Can also be used in the form Class.class to get a Class object.

Back

native

Front

1) Declares that a method is not implemented in the same Java source file, but rather in another language

Back

module

Front

1) Declares a module inside of a Java application (Java 9 and later only)

Back

else

Front

1) Executes a block of statements if the immediately preceding if test evaluates to false

Back

super

Front

1) Accesses members of a superclass, including overridden and hidden members 2) Calls a superclass constructor 3) Specifies the lower bound of a generic type parameter

Back

extends

Front

1) Declares a class to be a subclass of a superclass 2) Declares an interface to be a subinterface of a superinterface 3) Specifies the upper bound of a generic type parameter

Back

assert

Front

1) Describes a predicate (a true-false statement) placed in a Java program to indicate that the developer thinks that the predicate is always true at that place. If an assertion evaluates to false at run-time, an assertion failure results. Note: The JVM disables assertion validation by default; it must be explicitly enabled

Back

do

Front

1) Executes a block of statements before a while test

Back

interface

Front

1) Defines the implementation of a special type of class that can only contain abstract or default methods, static final fields, and static interfaces.

Back

private

Front

1) Declares that a method, field, or inner class can only be accessed by other members of their own class

Back

long

Front

1) Declares a primitive field that holds a 64-bit signed two's complement integer (0 by default) 2) Declares that a method returns a value of the primitive type long.

Back

double

Front

1) Declares a field capable of holding a 64-bit double precision floating-point number 2) Declares that a method returns a value of the primitive type double

Back

const

Front

1) Reserved keyword but not used

Back

transient

Front

1) Declares that a variable member of a Serializable class is not part of a the persistent state of an object

Back

byte

Front

1) Declares a primitive byte field that holds an 8-bit signed two's complement integer (0 by default) 2) Declares that a method returns a value of the primitive type byte.

Back

char

Front

1) Declares a character field capable of holding any character of the java source file's character set ('\u0000' by default) 2) Declares that a method returns a value of the primitive type char

Back

implements

Front

1) Declares that a class implements one or more specified interfaces, inheriting their types and abstract methods

Back

package

Front

1) Defines a 'name space' for the Java class

Back

try

Front

1) Executes a block of statements, jumping execution to a catch or finally block if an exception is thrown. Must have at least one catch block, or one finally block.

Back

instanceof

Front

1) Operator with object as first operand and class or interface as second operand that evaluates to true if and only if the runtime type of the object is assignment compatible with the class or interface

Back

abstract

Front

1) As class modifier - class cannot be instantiated 2) As method modifier - must be implemented in sub classes Note: cannot be used with variables or constructors

Back

switch

Front

1) Creates a switch statement that matches a value to a case and executes that case's block of statements.

Back

synchronized

Front

1) Declares that a method or code block acquires a mutex lock for an object (or class for static methods) during code execution.

Back

static

Front

1) Declares that a field is a class field, and the class will always maintain exactly one copy of the field shared by all instances of the class 2) Declares that a method is a class method, and cannot access instance members of the enclosing class 3) Declares that an inner class cannot access instance members of the enclosing class

Back

break

Front

1) Ends execution in the current loop body. If followed by a label, ends execution in the enclosing labeled loop body.

Back

throws

Front

1) Declares that a method does not handle a type of exception, passing the exception to its caller.

Back

case

Front

1) Labels an expression evaluated by a switch statement, which executes all statements that follow a matching case label. Can be zero,one, or more in a switch block.

Back

throw

Front

1) Jumps program execution to the first enclosing exception handler compatible with a declared exception instance. If no exception handler is found, ends execution of the method and repeats this process in the calling method. If no exception handler is found in any method on the call stack, passes the exception to the thread's uncaught exception handler.

Back

if

Front

1) Creates an if statement that executes a block of statements if a test expression evaluates to true

Back

boolean

Front

1) Declares a primitive boolean field for the values "true" or "false" only (false by default) 2) Declares that a method returns a value of the primitive type boolean

Back

public

Front

1) Declares that a method, field, or class can be accessed by members of any class

Back

this

Front

1) References the current instance of the class in which it appears 2) References a constructor in the class in which it appears

Back

import

Front

1) Defines classes, packages, or static members of a class for further reference without fully qualified names

Back

finally

Front

1) Executes a block of statements after the immediately preceding try bock (and any associated catch clauses) finishes execution

Back

strictfp

Front

1) Declares that a class's methods restrict floating point calculation precision and rounding to ensure portability 2) Declares that a method restricts floating point calculation precision and rounding to ensure portability (cannot be used with abstract methods)

Back

return

Front

1) Ends execution of a method. If followed by a value of type defined in the method signature, returns the value.

Back

continue

Front

1) Jumps program execution to either the end of the current loop body, or if followed by a label, to the end of the enclosing labeled loop body

Back

Section 2

(7 cards)

default accessibility modifier (no accessibility modifier stated) (also known as package-private)

Front

1) declares that a class is only visible to other classes of its package 2) Declares that a method, field, or inner class can only be accessed by other members of their own class or classes from the same package

Back

rules for identifiers

Front

1) must begin with letter, underscore, or $; then continues with any combination of letters, numbers, underscores, and $

Back

false

Front

1) not actually a keyword, but it is a literal and cannot be used as an identifier

Back

var

Front

1) not actually a keyword, but it is a reserved type name that prompts the compiler to infer the type of a declared variable (Java 10+)

Back

true

Front

1) not actually a keyword, but it is a literal and cannot be used as an identifier

Back

null

Front

1) not actually a keyword, but it is a literal and cannot be used as an identifier

Back

while

Front

1) Creates a while loop that executes a block of statements as long as a text expression evaluates to true

Back