/ REFERENCE

Reference - Java Keyword

Java reserved keywords

abstract

A non-access modifier.

Used for classes and methods

  • An abstract class cannot be used to create objects (to access it, it must be inherited from another class)

  • An abstract method can only be used in an abstract class(it does not have a body, the body is provided by the subclass)

관련 수업기록 보러가기

관련 w3s 메모 보러가기

assert

For debugging

boolean

A data type that can only store true and false values

관련 수업기록 보러가기

관련 w3s 메모 보러가기

break

breaks out of a loop or a switch block

관련 수업기록 보러가기

관련 w3s 메모 보러가기

byte

A data type that can store whole numbers from –128 and 127

관련 수업기록 보러가기

관련 w3s 메모 보러가기

case

Marks a block of code in switch statements

관련 수업기록 보러가기

관련 w3s 메모 보러가기

catch

Catches exceptions generated by try statements

관련 수업기록 보러가기

관련 w3s 메모 보러가기

char

A data type that is used to store a single character

관련 수업기록 보러가기

관련 w3s 메모 보러가기

class

Defines a class

관련 수업기록 보러가기

관련 w3s 메모 보러가기

continue

Continues to the next iteration of a loop

관련 w3s 메모 보러가기

default

Specifies the default block of code in a switch statement

관련 수업기록 보러가기

관련 w3s 메모 보러가기

do

Used together with while to create a do-while loop

관련 w3s 메모 보러가기

double

A data type that can store whole numbers from 1.7e-308 to 1.7e+308

관련 수업기록 보러가기

관련 w3s 메모 보러가기

else

Used in conditional statements

관련 수업기록 보러가기

관련 w3s 메모 보러가기

enum

Declares an enumerated(unchangeable) type

관련 w3s 메모 보러가기

exports

Exports a package with a module

extends

Extends a class(indicates that a class is inherited from another class)

관련 수업기록 보러가기

관련 w3s 메모 보러가기

final

A non-access modifier, makes non-changeable(impossible to inherit or override)

관련 수업기록 보러가기

관련 w3s 메모 보러가기

finally

Used with exceptions, a block of code that will be executed no matter if there is an exception or not

관련 수업기록 보러가기

관련 w3s 메모 보러가기

float

A data type that can store whole numbers form 3.4e-038 to 3.4e+038

관련 수업기록 보러가기

관련 w3s 메모 보러가기

for

Create a for loop

관련 수업기록 보러가기

관련 w3s 메모 보러가기

if

Makes a conditional statement

관련 수업기록 보러가기

관련 w3s 메모 보러가기

implements

Implements an interface

관련 수업기록 보러가기

관련 w3s 메모 보러가기

import

Used to import a package, class or interface

관련 수업기록 보러가기

관련 w3s 메모 보러가기

instanceof

Check whether an object is an instance of a specific class or an interface

int

A data type that can store whole numbers from –2147483648 to 2147483647

관련 수업기록 보러가기

관련 w3s 메모 보러가기

interface

Used to declare a special type of class that only contains abstract methods

관련 수업기록 보러가기

관련 w3s 메모 보러가기

long

A data type that can store whole numbers from –9223372036854775808 to 9223372036854775808

관련 수업기록 보러가기

관련 w3s 메모 보러가기

module

Declares a module

native

Specifies that a method is not implemented in the same Java source file(but in another language)

new

Creates new objects

관련 수업기록 보러가기

관련 w3s 메모 보러가기

package

Declares a package

관련 수업기록 보러가기

관련 w3s 메모 보러가기

private

An access modifier, making accessible within the declared class(so class can’t use)

관련 수업기록 보러가기

관련 w3s 메모 보러가기

protected

An access modifier, making accessible in the same package and subclasses(so class can’t use)

관련 수업기록 보러가기

관련 w3s 메모 보러가기

public

An access modifier, making accessible by any other class

관련 수업기록 보러가기

관련 w3s 메모 보러가기

requires

Specifies required libraries inside a module

return

Finished the execution of a method, and can be used to return a value from a method

관련 수업기록 보러가기

관련 w3s 메모 보러가기

short

A data type that can store whole numbers from –32768 to 32767

관련 수업기록 보러가기

관련 w3s 메모 보러가기

static

A non-access modifier used for method and attributes

It can be accessed without creating an object of a class

관련 수업기록 보러가기

관련 w3s 메모 보러가기

strictfp

Restrict the precision and rounding of floating point calculations

super

Refers to superclass(parent) objects

관련 수업기록 보러가기

switch

Selects one of many code blocks to be executed

관련 수업기록 보러가기

관련 w3s 메모 보러가기

synchronized

A non-access modifier, which specifies that methods can only be accessed by one thread at a time

this

Refers to the current object in a method or constructor

관련 수업기록 보러가기

throw

Creates a custom error

관련 수업기록 보러가기

throws

Indicates what exceptions may be thrown by a method

관련 w3s 메모 보러가기

transient

A non-access modifier, which specifies that an attribute is not part of an object’s persistent state

try

Creates a try…catch statement

관련 수업기록 보러가기

관련 w3s 메모 보러가기

var

Declares a variable

void

Specifies that a method should not have a return value

관련 수업기록 보러가기

관련 w3s 메모 보러가기

volatile

Indicates that an attribute is not cached thread-locally

Is always read from the “main memory”

while

Creates a while loop

관련 수업기록 보러가기

관련 w3s 메모 보러가기