Please enable JavaScript to use CodeHS

Nitro Glossary

Flashcards

Course:

Module:

Lesson:

Search:

String Java

String is a Java type that represents a string of characters (text)

String Literals Java

A sequence of characters enclosed in double quotations “ “.

Java Main Skeleton Java

Includes the class and main method arguments. Must include both in order to run successfully.

public static void main(String args[]) Java

Main method. Code to be run must be placed within the main method.

public class MyProgram Java

Class. The name of MyProgram must match the name of the file.

System.out.print Java

Displays output on the computer monitor.

System.out.println Java

Displays output on the computer monitor and moves cursor to next line.

Variable General

A symbol or container that holds a value.

variable

int Java

`int` is a Java type that represents an integer (a whole number)

char Java

`char` is a Java type that represents a single character (a single letter)

double Java

`double` is a Java type that represents a real number with decimal values

Declare a variable Java

Declaring a variable is defining it for the first time.

Initialize a variable Java

Initializing a variable is giving it an initial value, or a starting value.

Primitive Type Java

Primitive types are the basic, simple data types that are inherent to Java (int, double, char, and boolean)

Boolean Java

A boolean is a true or false value.

Reference Type Java

Reference variables store the address of the value

final Java

Prevents variables from changing value.

Modulus operator General

The modulus operator (written as % in most programming languages) divides two numbers and returns the remainder.

Integer Division General

When two integers are divided, the decimal values are truncated, or chopped off.

Order of Operations Java

The order in which mathematical expressions should be evaluated. Starts with Parentheses, Exponents, Multiplications and Division, Addition and Subtraction.

Literal Java

The fixed value being assigned to a variable. Often primitive data types.

ArithmeticException Java

Exception that is thrown to warn programmers about arithmetic errors in their code.

Increment Java

Increase the value of a variable by one. variable++;

Decrement Java

Decrease the value of a variable by one. variable--;

Compound Assignment Operators Java

Allows programmers to shortcut variable assignments that include the variable being assigned a new value: x = x + y; shortcut: x += y;

Casting Java

Turning something of one type into another type!

Implicit Casting Java

When Java automatically casts the value correctly without the programmer needing to do so

(int)(x + 0.5) Java

Rounds the value of a double to the nearest whole number.

Integer.MAX_VALUE Java

The highest value Java is able to access. 2147483647

Overflow Java

When a calculation relies on a number outside the acceptable number range, Java will wrap back to the MIN or MAX value depending on the value.

variable.nextLine() Java

Allows users to input String values.

variable.nextInt() Java

Allows users to input int values.

variable.nextDouble() Java

Allows users to input double values.

Package Java

Packages are used to group code into a folder for easy use.

Scanner class Java

A class within java.util. It contains code specifically designed to help with user input.