CS Awesome - Unit 1 Vocabulary

studied byStudied by 2 people
0.0(0)
Get a hint
Hint

Variable

1 / 35

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

36 Terms

1

Variable

A name associated with a memory location in the computer.

New cards
2

object variable

Holds a reference which points to the object in memory.

New cards
3

boolean

used to declare a variable that can only have the value true or false.

New cards
4

double

used to declare a variable that is a decimal number like 3.25.

New cards
5

int

used to declare a variable of type integer (a whole number like -3 or 235).

New cards
6

static

means that the field or method exists in the object that defines the class.

New cards
7

compiler

Software that translates the Java source code into the Java class file that can be run.

New cards
8

compiler/syntax error

An error or bug that is found by the compiler like a missing semicolon

New cards
9

logic error

error that has correct syntax but undesired output by the programmer

New cards
10

Class

  • used to define a type of objects (classify something)

  • creates Objects that do the actual work in object-oriented programming.

  • Defines attributes of the object

  • Allows for actions to be taken

New cards
11

attribute

data/properties of a class

New cards
12

method

type (class) with abilities/behaviors

New cards
13

Main Method

  • Where execution starts in a Java program.

  • used to test the class

New cards
14

constructor

  • ways to initialize fields that have the same names as a class

  • many constructors can be used for the same object

New cards
15

Boolean

An expression that is either true or false.

New cards
16

Camel Case

One way to create a variable name by appending several words together and uppercasing the first letter of each word after the first word (myScore).

New cards
17

Casting

  • Changing the type of a variable using (type) name.

  • i.e. rounding

    • Positive numbers: (int)(x + .5)

    • Negative number: (int)(x - .5)

New cards
18

System.out.println()

Java method that lets us print out a line of output followed by a newline to the user

New cards
19

Declare a Variable

Specifying the type and name for a variable. This sets aside memory for a variable of that type and associates the name with that memory location.

New cards
20

Initializing a Variable

The first time you set the value of a variable.

New cards
21

String literal

Text enclosed by double quotes.

New cards
22

modulo

The % operator which returns the remainder from one number divide by another.

New cards
23

Operator

Common mathematical symbols such as + for addition and * for multiplication.

New cards
24

Shortcut or compound assignment operators

Operators like x++ or x+= 1 which mean x = x + 1

New cards
25

assignment statements

  • initialize or change the value stored in a variable using the assignment operator =.

  • always has a single variable on the lefthand side

New cards
26

data type

determines the size of memory reserved for a variable, for example int, double, boolean, String.

New cards
27

ArithmeticException

If you divide by zero, you will get this error.

New cards
28

operator precedence

Some operators are done before others, for example *, /, % have precedence over + and -, unless parentheses are used.

New cards
29

arithmetic expression

a sequence of operands and operators that describe a calculation to be performed, for example 3*(2 + x)

New cards
30

increment operator

The operator (++) that increases the value of a numerical variable by one.

New cards
31

string literal

characters inside the quotation marks: “”

New cards
32

delimiter

  • open and close curly braces that indicate to java to start and close a line

  • {} are used to surround blocks of code such as methods or the contents of classes

  • () are used in mathematical expressions and to surround parameter lists for method calls

  • [] they are used for arrays (lists)

New cards
33

integer division

  • arithmetic operation that uses two int values to evaluate to an int value (no decimal)

  • i.e. ¾ = 0

New cards
34

System.out.println( String.format("%.02f", number) );

Decimal output formatted to only show 2 decimal places

New cards
35

postfix operator

  • operator after the variable name

  • value of the variable is changed after evaluating the variable to get its value.

New cards
36

prefix operator

  • operator before the variable name

  • value of the variable in incremented before the variable is evaluated to get the value of the expression

New cards

Explore top notes

note Note
studied byStudied by 48 people
... ago
5.0(1)
note Note
studied byStudied by 52 people
... ago
5.0(1)
note Note
studied byStudied by 21 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 30755 people
... ago
4.4(25)
note Note
studied byStudied by 20 people
... ago
5.0(1)
note Note
studied byStudied by 226 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (148)
studied byStudied by 5 people
... ago
5.0(2)
flashcards Flashcard (116)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (63)
studied byStudied by 6 people
... ago
5.0(1)
flashcards Flashcard (23)
studied byStudied by 14 people
... ago
5.0(1)
flashcards Flashcard (200)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (47)
studied byStudied by 28 people
... ago
5.0(2)
flashcards Flashcard (37)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (81)
studied byStudied by 6 people
... ago
5.0(1)
robot