Java Programming and Data Structures - Chapter 4: Mathematical Functions, Characters, and Strings

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

1/20

flashcard set

Earn XP

Description and Tags

A collection of vocabulary flashcards for key concepts related to mathematical functions, characters, and strings in Java programming.

Last updated 1:45 AM on 4/2/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Math Class

A class in Java that provides many useful methods for performing common mathematical functions.

2
New cards

exp(double a)

Returns e raised to the power of a.

3
New cards

log(double a)

Returns the natural logarithm of a.

4
New cards

sqrt(double a)

Returns the square root of a.

5
New cards

ceil(double x)

Returns x rounded up to its nearest integer.

6
New cards

floor(double x)

Returns x rounded down to its nearest integer.

7
New cards

abs(a)

Returns the absolute value of the parameter a.

8
New cards

random()

Returns a random double value in the range [0.0, 1.0).

9
New cards

Character Data Type

Represents a single 16-bit Unicode character in Java.

10
New cards

Unicode

A 16-bit encoding scheme that supports the representation of characters from various languages.

11
New cards

isDigit(ch)

Returns true if the specified character is a digit.

12
New cards

String Type

A data type in Java that represents a sequence of characters.

13
New cards

length()

Returns the number of characters in a string.

14
New cards

charAt(index)

Returns the character at the specified index from a string.

15
New cards

concat(s1)

Returns a new string that concatenates this string with string s1.

16
New cards

toUpperCase()

Returns a new string with all letters in uppercase.

17
New cards

toLowerCase()

Returns a new string with all letters in lowercase.

18
New cards

trim()

Returns a new string with whitespace removed from both ends.

19
New cards

printf()

A method used to format output using specified format specifiers.

20
New cards

%d

Format specifier for decimal integers.

21
New cards

%f

Format specifier for floating-point numbers.