stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Fontys Venlo - Programming Concepts - week 6 Flashcards | StudBud
Explore
/
Fontys Venlo - Programming Concepts - week 6
Fontys Venlo - Programming Concepts - week 6
10 terms
·
StudBud Administration
·
69 plays
#fontys #fhtenl #prc1 #java #week6
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
How to correctly call the following method (
see picture
)?
double hours = calculateHours(2, 8.0);
hoursPerDay = calculateHours(8.0, 2);
int hours = calculateHours(2, 8.0);
double calculateHours();
2
What is NOT a correct method definition named
printSomething
in Java?
public void printSomething(String something)
public void print(something)
public String printSomething(int i)
public String printSomething()
3
See the following
picture
, what is the
return value type
?
void
int
static
printLine
4
How is it called, when methods have the same name but different parameters? (
see picture
)
Parameter polymorphism
Method overloading
Parameter loading
Multiple method convergence
5
Please see the following method call. Which
method definition begin
is
NOT
correct?
private static boolean startCourse(int numberOfStudents)
private static boolean startCourse(int num)
private static int startCourse(int students)
private static boolean startCourse(int students)
6
How do you correctly define a multidimensional array?
String[10][10] table = new String[10][10];
String[][] table = new String[10][10];
String[][] table = new String[][];
String[10][10] table = new String[][];
7
What is
NOT
a correct array definition?
int[] myIntArray= {1,2,3};
int[] myIntArray = new int[];
int[] myIntArray = new int[]{1,2,3};
int[] myIntArray = new int[3];
8
What is
NOT
a good reason to make use of methods in java?
Makes the code faster
Leads to better maintainable code
Allows reusability of code
Improves readability of your code
9
What is a correct array definition?
int numbers = new int[20];
int numbers = new int[];
int[] numbers = new int[20];
int[] numbers = new int[];
10
Consider the following code in the
picture
, which next line is
NOT
possible (throws Exception)
System.out.println(myNumber[0]);
System.out.println(myNumber[1]);
System.out.println(myNumber[12]);
System.out.println(myNumber[11]);