• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 2 van de 9 pagina's
Tentamen (uitwerkingen)

Java Chapter 5 Exam Questions and Answers All Correct

Document preview thumbnail
Voorbeeld 2 van de 9 pagina's

Java Chapter 5 Exam Questions and Answers All Correct

Voorbeeld van de inhoud

Java Chapter 5 Exam Questions
and Answers All Correct

A special variable that holds a value being passed into a method is called what?
A) Modifier
B) Parameter
C) Alias
D) Argument - Answer-Answer: B

When you pass an argument to a method, be sure that the argument's data type is
compatible with:
A) the parameter variable's data type
B) the method's return type
C) the version of Java currently being used
D) IEEE standards - Answer-Answer: A

A parameter variable's scope is:
A) the method in which the parameter is declared
B) the class to which the method belongs
C) the main method
D) All of the above - Answer-Answer: A

The lifetime of a method's local variable is:
A) the duration of the program
B) the duration of the class to which the method belongs
C) the duration of the method that called the local variable's method
D) only while the method is executing - Answer-Answer: D

Local variables:
A) are hidden from other methods
B) may have the same name as local variables in other methods
C) lose the values stored in them between calls to the method in which the variable is
declared
D) All of the above - Answer-Answer: D

Which of the following values can be passed to a method that has an int parameter
variable?
A) float

, B) double
C) long
D) All of the above
E) None of the above - Answer-Answer: E

The header of a value-returning method must specify this.
A) The method's local variable names
B) The name of the variable in the calling program that will receive the returned value
C) The data type of the return value
D) All of the above - Answer-Answer: C

What will be returned from the following method?
public static double methodA()
{
double a = 8.5 + 9.5;
return a;
}
A) 18.0
B) 18 (as an integer)
C) 8
D) This is an error. - Answer-Answer: A

In a @return tag statement the description:
A) cannot be longer than one line
B) describes the return value
C) must be longer than one line
D) describes the parameter values - Answer-Answer: B

When a method tests an argument and returns a true or false value, it should return:
A) a zero for true and a one for false
B) a boolean value
C) a zero for false and a non-zero for true
D) a method should not be used for this type test - Answer-Answer: B

The phrase divide and conquer is sometimes used to describe:
A) the backbone of the scientific method
B) the process of dividing functions
C) the process of breaking a problem down into smaller pieces
D) the process of using division to solve a mathematical problem - Answer-Answer: C

In a general sense, a method is:
A) a plan
B) a statement inside a loop
C) a comment
D) a collection of statements that performs a specific task - Answer-Answer: D

Documentinformatie

Geüpload op
12 juli 2025
Aantal pagina's
9
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
$13.99

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Scholarsstudyguide
3.8
(169)
Verkocht
853
Volgers
476
Items
16409
Laatst verkocht
1 week geleden




Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen