Unit 3/4 Flashcards

(7 cards)

1
Q

Name the De Morgan Laws.

A

not (A or B) = (not A) and (not B)
not (A and B) = (not A) or (not B)

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

What does ! symbolize?

A

not

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

What does name.substring(#, #) do?

A

Gives the part of the string starting from index # and excluding index #.

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

What does name.substring(#) do?

A

Returns the part of the string starting from index #.

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

How does compareTo work?

A
  • 0 if equal
  • negative if a < b
  • positive if a > b
  • a < A
  • test < testing
  • testing > test
  • A < B
  • a < b
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does String.valueOf() do?

A

Converts int to String

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

What does Integer.parseInt(“#”) do?

A

Converts the string to integer

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