Java chapter 5

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

relational operators

==,<,<=,>,>=,!=; operators that can be used to form a boolean expression

case

a clause in the switch statement that contains statements to be executed when the case condition matches the result of the switch expression

if

a decision structure that executes a set of statements when a condition is true

if-else

a decision structure that executes one set of statements when a condition is true and another set of statements when the condition is false

switch

a decision structure that uses the result of an expression to determine which set of statements to execute

if-else if

a decision structure used to decide among three or more actions

Math

a java.lang class with methods for performing math functions

nested

a statement placed within the same type of statement

truth table

a table that shows the possible outcomes of two expressions joined by a logical operator

boolean expression

an expression that evaluates to true or false

compound boolean expression

an expression that includes more than one Boolean expression

==

equality operator

logical operators

examples= &&, !, ||

>

greater than operator

&&

the logical AND operator

!!

the logical NOT operator

||

the logical OR operator

random()

returns a double value greater than or equal to 0.0 and less than 1.0

conditional control structure

a statement that branches program flow depending on a condition, aka descision structure

break

a statement that moves program control to the next statement after the current structure

>=

greater than or equal to operator

<

less than operator

<=

less than or equal to operator

!=

not equal operator

abs(num)

returns the absolute value of num which is a double value

acos(num)

returns the arc cosine of angle num which is a double value

asin(num)

returns the arc sine of angle num which is a double value

atan(num)

returns the arc tangent of angle num which is a double value

cos(num)

returns the cosine of the angle num which is a double value

exp(num)

returns the exponential number e(2.718...) raised to the power of a num which is a double value

max(num1, num2)

returns the larger of num1 and num2 which can be two double or two int values

log(num)

returns the natural logarithm of num, which is a double value

sin(num)

returns the sine of angle num which is a double value

min(num1, num2)

returns the smaller of num1 and num2 which can be two doubles or two int values

tan(num)

returns the tangent of angle num which is a double value


Kaugnay na mga set ng pag-aaral

Government programs and insurance

View Set

3.11 - BEC 3 Capital Budgeting: Internal Rate of Return

View Set

Adaptive Quiz 6 Study: Fluid and Electrolytes

View Set

Unit 7 Vocab. Austere-Vulnerable.

View Set

Texas Promulgated Contracts Ch 5 - 9

View Set

Atomic Emission Spectra and the Bohr Model

View Set