Finals Study Flashcards

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
Q

why do we need getter/accessor methods

A

to access the private instance variables

26
Q

what do setter/mutator methods do

A

change the values of the private instance variables

27
Q

what does private instance variables do

A

preserves the state of an object

28
Q

in the UML class diagrams, what does the minus sign represent

A

represents private

29
Q

in the UML class diagrams, what does the plus sign represent

A

represents public

30
Q

when does an external method call occur

A

when a method is called outside of its class

31
Q

what is a non static method call

A

object followed by a dot followed by the method call
String name = s.getName();

32
Q

what is a static method call

A

class name followed by dot followed by method call
double result = Math.log();

33
Q

what do variables do in classes

A

store data

34
Q

what do methods do in classes

A

perform actions

35
Q

can you use == or != with null values

A

yes because null values still have memory addresses

36
Q

can you change values declared at static final

A

no they are considered constants and cannot be changed

37
Q

can you change values declared at static

38
Q

what are static variables also called

A

class variables

39
Q

what are static/instance variables also called

A

fields or data members

40
Q

do wrapper classes have default constructors or set methods

41
Q

methods are blocks of code that should be

A

used and reused