data types in java Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

int (whole numbers)

A

integer only holds values of neg + pos whole numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

double (real numbers 6.2)

A

decimals
pos + neg nums
can hold whole nums but main use fractional values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

boolean (true / false)

A

evaluate true false conditions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

flaost (real numbers)

A

similar to doubles
hold values of better precision
stores these differently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

long (long ints)

A

big int values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

chars (characters - b)

A

hold single characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

string (“hello world”)

A

non primitive

collection of characters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

variables

A
uses CamelCase (naming convention)
does not need to be declared with a value) 
store + manipulate data (can be changed while program runs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

constant

A

uses ALL_CAPITALS as a naming convention
uses final keyword in java
needs value (cannot be changed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

both

A
identifier/name 
associated with a particular memory location 
cannot be called 
reserve words 
have spaces
case sensitive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

procedure

A
  • named identifier
  • performs a task
  • returns no value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

function

A
  • named identifier
  • performs a task
  • returns a single value based on return type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

parameter

A
  • named identifier
  • allows data to be inputted into a procedure or function
  • has a data type
  • referenced in code and substituted with the value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly