M2: Basic Expressions and Naming Conventions

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

implicit type conversion

A type conversion that the compiler can perform automatically such as an int to double.

2
New cards

type cast

A type within parenthesis, such as (int), tell the compiler to explicitly convert one type to another. double pi = 3.14; int n = (int) pi; //results in 3 in the variable n.

3
New cards

method call/invoking a method

Passes arguments to the method's parameters and then executes the method's statements.

4
New cards

argument

A value, which may be the result of evaluating an expression, that is passed to and intializes a method parameter.

5
New cards

identifier

A case sensitive name created by a programmer such as for a variable, method or class. Can only use A-Z, a-z, _, $ or 0-9 and must not start with a digit. Typically don't use $ and use _ for constants.

6
New cards

variable and method naming convention

camelCaseFirstCharacterLowerCase

7
New cards

class naming convention

CamelCaseFirstLetterUpperCase

8
New cards

constant naming convention

NAME_IN_UPPERCASE_WITH_UNDERSCORES

9
New cards

escape sequence

A 2 character sequence starting with \ that represents a special character such as \n, \t, \\, or \".

10
New cards

keyword

A reserved word in a programming language such as int, double, class, or public.

11
New cards

statement

A standalone element of a programming language that expresses an action.

12
New cards

expression

A section of code containing values, variables, and methods that evaluates to a value.

13
New cards

variable declaration

A statement that declares a new variable specifying a data type and name.

14
New cards

primitive data types

byte, short, int, long, float, double, char and boolean.

15
New cards

literal

Data in a program such as 8, 3.14, 'A' or "hello" that appears in an expression.

16
New cards

integer literal

A whole number such as -5 or 10.

17
New cards

floating-point literal

A number with a decimal point such as 3.14, 3.14F or in scientific notation 6.02e23.

18
New cards

char literal

A character in a program within ' ' such as 'A', 'b' or '\u0043'.

19
New cards

final

Keyword in Java that, for a variable, denotes that the value of the variable won't change once set, it is constant.Example: final int MAX_ROWS = 5;