stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Fontys Venlo - Programming Concepts - week 5 Flashcards | StudBud
Explore
/
Fontys Venlo - Programming Concepts - week 5
Fontys Venlo - Programming Concepts - week 5
10 terms
·
StudBud Administration
·
80 plays
#fontys #fhtenl #prc1 #java #week5
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
See the following
picture
, what is the
return value type
?
printLine
void
int
static
2
See the following code (see image), which statement is
TRUE
?
If you type 10 there is no output and the loop stops
If you type 1 the output is 1 and the loop continues
If you type 10 there is no output and the loop continues
If you type 1 the output is 1 and the loop stops
3
How is it called, when methods have the same name but different parameters? (
see picture
)
Method overloading
Parameter loading
Parameter polymorphism
Multiple method convergence
4
How can you
skip
a part of the
loop
body and go to the
next loop run
(next value)?
next;
goto;
continue;
break;
5
What is
NOT
a loop in java?
for
for each
repeat until
while
6
How to correctly call the following method (
see picture
)?
hoursPerDay = calculateHours(8.0, 2);
double hours = calculateHours(2, 8.0);
int hours = calculateHours(2, 8.0);
double calculateHours();
7
What will be printed out if you run the following code (
see picture and be careful :-)
) ?
2 3
0 1 2
1 2
1 2 3
8
How can you
stop
a
while
or
forloop
and continue after the loop?
break;
stop;
halt;
continue;
9
What is NOT a correct method definition named
printSomething
in Java?
public String printSomething()
public void print(something)
public String printSomething(int i)
public void printSomething(String something)
10
What is
NOT
a good reason to make use of methods in java?
Allows reusability of code
Improves readability of your code
Makes the code faster
Leads to better maintainable code