Back to marketplace

U3: Predefined Methods

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Method [A]

Back (Answer)

• Has own name • Action already written • Stored in separate file “class” having name

#2
Front (Question)

Method [B]

Back (Answer)

• Needs info to be sent • Can return data to main program • Can be executed from main program

#3
Front (Question)

Passing Arguments

Back (Answer)

Information sent to a method

#4
Front (Question)

Outputting Math Methods

Back (Answer)

System.outprintln(Math.method(num1, num2))

#5
Front (Question)

max

Back (Answer)

• Maximum of two numbers • int num1 = 34; int num2 = 12; • Output: 34

#6
Front (Question)

min

Back (Answer)

• Minimum of two numbers • int num1 = 34; int num2 = 12; • Output: 12

#7
Front (Question)

pow

Back (Answer)

• First input to power of 2nd • int num1 = 2; int num2 = 6; • Output: 64

#8
Front (Question)

abs

Back (Answer)

• Absolute value • double num = -34.214; • Output: 34.214

#9
Front (Question)

hypot

Back (Answer)

• (num1^2 + num2^2)^½: • int sideA = 4; int sideB = 3; • Output: 5

#10
Front (Question)

ceil

Back (Answer)

• Rounded up nearest integer • double num = 82.114; • Output. 82.0

#11
Front (Question)

floor

Back (Answer)

• Rounded down nearest integer • double num = 87.876 • Output: 87.0

#12
Front (Question)

sqrt

Back (Answer)

• Square root of number • double num = 64; • Output: 8.0

#13
Front (Question)

round

Back (Answer)

• Rounded to nearest integer • double num = 64.545 • Output: 65

#14
Front (Question)

random

Back (Answer)

• Positive double value between 0.0 and 1.0 • System.out.println(Math.random()); • Possible Output: 0.1311034762657053

#15
Front (Question)

toDegrees

Back (Answer)

• Angle in radians to degrees • double angle1 = 0.7853981633974483; • Output: 45

#16
Front (Question)

toRadians

Back (Answer)

• Angle in degrees to radians • double angle1 = 45; • Output: 0.7853981633974483

#17
Front (Question)

sin

Back (Answer)

• Sine for angle • double angle1 = 45; • Output: 0.649448048

#18
Front (Question)

cos

Back (Answer)

• Cosine for angle • double angle1 = 45; • Output: 0.760405965

#19
Front (Question)

External Class

Back (Answer)

Separate area from main program that contains methods program uses

#20
Front (Question)

tan

Back (Answer)

• Tangent for angle • double angle1 = 45; • Output: 0.854080685

#21
Front (Question)

Passing Arguments

Back (Answer)

“Passing” data from main program to method

#22
Front (Question)

Arguments

Back (Answer)

• Variables passed in method call • Inside brackets after name of method

#23
Front (Question)

Types of Arguments

Back (Answer)

Integers, Doubles, etc

#24
Front (Question)

Parameters

Back (Answer)

• Defined in method definition • Appear when writing actual method