Chapter 3 Flashcards

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

What are examples of keywords?

A

double, class, char, int, public, static

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

How do you define “int” and giving it a value?

A
import java.util.Scanner;
public class NAME
{
public static void main (String args[])
    {
      int a=1, b=2, c=3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is definition of “byte”?

A

a group of binary digits or bits (usually eight) operated on as a unit (8 ; – 128 to 127)

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

What is definition of “short”?

A
signed 16-bit type
least used   (16 ; -32 thousand to 32 thousand)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is definition of “int”?

A

signed 32-bit type; most common (32 ; -2 billion to 2 billion)

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

What is definition of “long”?

A

signed 64-bit type (64; 9 quintillion to 9 quintillion)

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

What are the binary operations?

A

Add, Subtract, Divide, MOD

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

What is the order of operations for binary?

A

Parenthesis, Exponents, Multiply/ Divide/MOD, Add/Subtract

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

What is Java real number data types?

A

“double” - more accurate and only one tested

“float” - not tested

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

Which binary arithmetic operation is something that you would not normally use?

A

MOD

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

How many bytes are there in double?

A

8 bytes

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

What does “X++” and “++X” output?

A

X+1

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

What does “+=” do?

A

double x = 1.3;
x += 0.1;
It takes the value of x, adds 0.1 to it, and then stores the result of (x + 0.1) back into x.

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

Be able to trace code using the short cuts…

A

GOOD LUCK!

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

What is “chaining”?

A

assign character to multiple fields

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

Who invented Boolean algebra?

A

George Boole

17
Q

What is Boolean?

A

A true = 1

or false = 0 statement.

18
Q

What is final?

A

A constant that cannot be changed without an error.

19
Q

Mathmatial opportations for java.

A

Parenthesis, Exponents, Multiply/ Divide/MOD, Add/Subtract

20
Q

What does an “int” number look like?

A

no decimal

18.564 -> 18 as an “int”

21
Q

What does a “double” number look like?

A

decimal

18.564123 -> 18.564123 as a “double”

22
Q

What is definition of “float”?

A

32 bits; shows decimals

half as much space as double but less precise with extremely big or small numbers.

23
Q

“float” vs “int”

A

“float” shows decimals

“int” does not show decimals