math methods, characters, string

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

54 Terms

1
New cards

Java provides many useful methods in the ________________ for performing common mathematical functions

math class

2
New cards

class constants

Math.pi, Math.E

3
New cards

returns the trigonometric sine of an angle in radians

Math.sin

4
New cards

returns the trigonometric cosine of an angle in radians

Math.cos

5
New cards

returns a raised to the power of b

pow(a, b)

6
New cards

returns a raised to the power of b

sqrt(x)

7
New cards

x rounded up to its nearest integer. This integer is returned as a double value

ceil(x)

8
New cards

x rounded down to its nearest integer. This integer is returned as a double value

floor(x)

9
New cards

x rounded to its nearest integer. If x is equally close to two integers, the even one is returned as a double.

rint(x)

10
New cards

x rounded to its nearest integer. If the first decimal place is <= .4, then round down, otherwise round up.

round(x)

11
New cards

returns the maximum or minimum of two parameters.

max(a, b) or min(a, b)

12
New cards

returns the absolute value of the parameter

abs(a)

13
New cards

a character data type represents a _____

single character

14
New cards

a string is enclosed in, a character is enclosed in

“ “, ‘ '

15
New cards

what can be used on char variables to get the next or preceding character?

increment and decrement operators

16
New cards

unicode can represent_____ characters

65536

17
New cards

ASCII code for 0-9

48-57

18
New cards

characters ‘A’ to ‘Z’ decimal values 

65-90

19
New cards

characters ‘a’ to ‘z’ decimal values 

97-122

20
New cards

unicode takes ____ bytes and is preceded by ___

2, \u

21
New cards

unicode is expressed in __________ numbers

4 hexadecimal

22
New cards

unicode runs from _______ to ________

‘\u0000’, ‘\uFFFF’

23
New cards

tab

\t

24
New cards

newline

\n

25
New cards

double quote

\”

26
New cards

format specifier: boolean value (true or false)

%b

27
New cards

format specifier: character ‘a’

%c

28
New cards

format specifier: integer

%d

29
New cards

format specifier: floating point number (~double)

%f

30
New cards

format specifier: string “ “

%s

31
New cards

specifies how an item should be displayed

format specifier

32
New cards

convert number into string

String s = “ “ + number;

33
New cards

convert numeric string into an int value (similar for double value)

int intValue = Integer.parseInt(intString);

34
New cards

To find a character/substring in a string, use the different format of the _________ and _________ methods

indexOf() and lastIndexOf()

35
New cards

Returns a substring that begins with the character at the specified beginIndex and extends to the character at index endIndex - 1

substring(beginIndex, endIndex)

36
New cards

returns a n integer > 0, == 0, < 0 to indicate whether the string is greater than, equal to, or less than s

compareTo(s1)

37
New cards

returns true if the string is equal to string s

equals(s1)

38
New cards

reading a string: invoke ____ method on a Scanner object

next()

39
New cards

method to read an entire line of text

nextLine()

40
New cards

the string type is not a primitive type, it is known as

reference type

41
New cards

returns the number of characters in the string

length()

42
New cards

returns the character at the specified index from the string

charAt(index)

43
New cards

get last letter method:

message.length() - 1

44
New cards

returns a new string that concatenates in the string with string s1

concat(s1)

45
New cards

returns a new string with all letters in uppercase

toUpperCase()

46
New cards

returns a new string with all letters in lowercase

toLowerCase()

47
New cards

returns a new string with whitespace characters trimmed on both sides

trim()

48
New cards

returns true if the specified character is a digit

isDigit(Ch)

49
New cards

returns true if the specified character is a letter

isLetter(ch)

50
New cards

returns true if the specified character is a letter or digit

isLetterOrDigit(ch)

51
New cards

returns true if the specified character is lowercase letter

isLowerCase(ch)

52
New cards

returns true if the specified character is uppercase letter

isUpperCase(ch)

53
New cards

returns the lowercase of the specified character

toLowerCase(ch)

54
New cards

returns the uppercase of the specified character

toUpperCase(ch)

Explore top flashcards

chap 1
Updated 1059d ago
flashcards Flashcards (69)
Athenaze Chapter 1
Updated 186d ago
flashcards Flashcards (35)
latijn 3.6
Updated 325d ago
flashcards Flashcards (23)
Midterm Marketing
Updated 932d ago
flashcards Flashcards (159)
4.5 Biology Quiz
Updated 693d ago
flashcards Flashcards (28)
chap 1
Updated 1059d ago
flashcards Flashcards (69)
Athenaze Chapter 1
Updated 186d ago
flashcards Flashcards (35)
latijn 3.6
Updated 325d ago
flashcards Flashcards (23)
Midterm Marketing
Updated 932d ago
flashcards Flashcards (159)
4.5 Biology Quiz
Updated 693d ago
flashcards Flashcards (28)