Chapter 4 slides Flashcards

1
Q

express exponent?

A

Math.exp(double a)

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

express natural log?

A

Math.log(double a)

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

express 10 based log?

A

Math.log10(double a)

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

express power?

A

Math,pow(double a, double b)

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

express square root?

A

Math.sqrt(double a)

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

round up to nearest integer?

A

Math.ceil(double a)

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

round down to nearest integer?

A

Math.floor(double a)

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

round to nearest integer?

A

Math.rint(double a)

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

return the max of two parameters?

A

Math.max(a, b)

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

return the minimum of two parameters?

A

Math.min(a,b)

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

return the absolute value of a parameter?

A

Math.abs(a)

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

generate a random double value greater than or equal to one parameter and less than another parameter?

A

a + Math.random() * b

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

Unicode

A

16 bit encoding scheme which takes two bytes, preceded by /u, expressed in four hexadecimal numbers that run from \u0000 to \uFFFF, so unicode can represent 65535 + 1 characters

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

ASCII code - ‘0’ to ‘9’

A

code value in decimal = 48 to 57
Unicode value = \uu30 to /uu0039

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

ASCII code ‘A’ to ‘Z’

A

code value in decimal = 65 to 90
Unicode value = \u0041 to \u005A

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

ASCII code ‘a’ to ‘z’

A

code value in decimal = 97 to 122
Unicode value = \u0061 to \u007A

17
Q

isDigit(ch)

A

returns true if the specified character is a digit

18
Q

isLetter(ch)

A

returns true if the specified character is a letter

19
Q

isLetterOfDigit

A

returns true of the specified character is a letter or digit

20
Q

isLowerCase(ch)

A

returns true if the specified character is a lowercase letter

21
Q

isUpperCase(ch)

A

returns true if the specified character is an upper character

22
Q

toUpperCase(ch)

A

returns the uppercase of the specified character

23
Q

to represent a string of characters, use…

A

a String, ex. String message = “Welcome to Java”

24
Q

length()

A

returns the number of characters in this string

25
Q

charAt(index)

A

returns the character at the specified index from this string

26
Q

concat(s1)

A

returns a new string that concatenates this string with string s1

27
Q

toUpperCase()

A

returns a new string with all letters in uppercase

28
Q

toLowerCase()

A

returns a new string with all letters in lowercase