1/20
These flashcards cover key vocabulary and definitions related to mathematical functions, characters, and strings in Java.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Math class
A class in Java that provides useful methods for performing common mathematical functions.
Exponent Methods
Methods for performing operations like exponentiation and logarithms in the Math class.
Rounding Methods
Methods used in Java to round numbers to their nearest integers or up/down.
Class constants
Named constants in the Math class such as PI and E.
max(a, b)
Returns the maximum value of two parameters.
min(a, b)
Returns the minimum value of two parameters.
abs(a)
Returns the absolute value of the parameter.
random()
Returns a random double value in the range [0.0, 1.0).
Character Data Type
A data type in Java representing a single 16-bit Unicode character.
ASCII Code
Character encoding standard used for representing text in computers, with a decimal value for each character.
String Type
A reference type in Java used to represent a sequence of characters.
substring(beginIndex)
Returns the substring from the specified begin index to the end of the string.
indexOf(ch)
Returns the index of the first occurrence of the character in the string.
equals(s1)
Returns true if the string is equal to the specified string s1.
toUpperCase()
Returns a new string with all letters converted to uppercase.
toLowerCase()
Returns a new string with all letters converted to lowercase.
concat(s1)
Concatenates the specified string s1 to the current string.
printf
A method used for formatted output in Java.
Format Specifiers
Symbols used in directives for formatted output, such as %d for integers and %f for floating-point numbers.
Casting
Converting one data type into another.
Scanner class
A class in Java used to get user input from various sources like keyboard.