Finals Study Flashcards

(42 cards)

1
Q

How many bits in a byte

A

8 bits

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

Name 2 character encoding standards

A

ASCII and Unicode

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

How many characters can ASCII handle

A

256 characters

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

How many characters can Unicode handle

A

65,536 characters (256^2)

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

What is a byte’s address

A

the numbered location where the byte resides

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

what kind of code can a CPU execute

A

machine code

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

is machine code a low or high level language

A

machine code is considered “low-level” language

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

what is an algorithm

A

a finite sequence of instructions for solving a problem or performing a task

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

How are algorithms typically expressed

A

in English of pseudocode

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

how to create a new scanner

A

Scanner keyboard = new Scanner(System.in);

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

name the primitive data types:

A

int, double, boolean, char, float, long, short

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

is java case sensitive

A

yes

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

what are the arithmetic operators

A

+, -, *, /

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

what is an example of an assignment variable

A

=

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

what are the compound assignment operators

A

+=, -=, *=, /=, %=

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

what is a conditional ternary operator

A

?

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

incrementing/ decrementing operators

18
Q

what are the logical operators

19
Q

what are the relational operators

A

<=, >=, ==. !=, <, >

20
Q

do switch statements require a default statement

21
Q

how do conditional ternary operators work

A

condition ? implement if true : implement if false

22
Q

what CANNOT a controlling expression be in a switch statement

A

a floating point number or a range

23
Q

anything you can do with a for loop, you can do for a while loop and…

A

vice versa applies as well

24
Q

are instance variables usually set as public or private

25
why do we need getter/accessor methods
to access the private instance variables
26
what do setter/mutator methods do
change the values of the private instance variables
27
what does private instance variables do
preserves the state of an object
28
in the UML class diagrams, what does the minus sign represent
represents private
29
in the UML class diagrams, what does the plus sign represent
represents public
30
when does an external method call occur
when a method is called outside of its class
31
what is a non static method call
object followed by a dot followed by the method call String name = s.getName();
32
what is a static method call
class name followed by dot followed by method call double result = Math.log();
33
what do variables do in classes
store data
34
what do methods do in classes
perform actions
35
can you use == or != with null values
yes because null values still have memory addresses
36
can you change values declared at static final
no they are considered constants and cannot be changed
37
can you change values declared at static
yes
38
what are static variables also called
class variables
39
what are static/instance variables also called
fields or data members
40
do wrapper classes have default constructors or set methods
nope
41
methods are blocks of code that should be
used and reused
42