Java Chapter 05 SD1420

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

a local variable

A variable defined inside a method is referred to as __________.

public static void main(String[] args)

All Java applications must have a method __________.

parentheses

Arguments to methods always appear within __________.

public static void main(String[] args) { Math.pow(2, 4); }

Does the method call in the following method cause compile errors ? (NO)

a stack

Each time a method is invoked, the system stores parameters and local variables in an area of memory, known as _______, which stores elements in last-in first-out fashion.

void

Suppose your method does not return any value, which of the following keywords can be used as a return type?

information hiding and encapsulation

The client can use a method without knowing how it is implemented. The details of the implementation are encapsulated in the method and hidden from the client who invokes the method. This is known as __________.

method name and parameter list

The signature of a method consists of ____________.

Math.PI / 6

What is Math.asin(0.5)?

4.0

What is Math.ceil(3.6)?

3.0

What is Math.floor(3.6)?

3

What is Math.max(Math.min(3, 6), 2)?

4.0

What is Math.rint(3.5)?

4.0

What is Math.rint(3.6)?

4

What is Math.round(3.6)?

1.0

What is Math.sin(Math.PI / 2)?

0.5

What is Math.sin(Math.PI / 6)?

2.0

What is Math.sqrt(4.0)?

invalid call

What will be displayed by the call nPrint('a', 4)?

pass by value

When you invoke a method with a parameter, the value of the argument is passed to the parameter. This is referred to as _________.

0.5 and 0.0

Which of the following is a possible output from invoking Math.random()?

Write a method that prints integers from 1 to 100.

Which of the following should be defined as a void method?


Set pelajaran terkait

management of patients with oncologic disorders

View Set

Wiley Ch12 Intangible Asset 是非題

View Set