stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Fontys Venlo - Programming Concepts - week 7 Flashcards | StudBud
Explore
/
Fontys Venlo - Programming Concepts - week 7
Fontys Venlo - Programming Concepts - week 7
11 terms
·
StudBud Administration
·
70 plays
#fontys #fhtenl #prc1 #java #week7
Flashcards
11 cards
F
Practice quiz
P
Host live
L
Questions
11
Answers
1
How do you correctly define a multidimensional array?
String[][] table = new String[10][10];
String[10][10] table = new String[10][10];
String[10][10] table = new String[][];
String[][] table = new String[][];
2
Regarding visibility of accessors of
variables
, what is
NOT
correct?
public: cannot be seen by objects of other classes
private: can be seen by objects of other classes
private: accessible only by object of the same class.
public can be seen by whole world
3
How do you correctly create an object of a
Ninja class
called
Kai
?
Ninja kai = new Ninja("Kai")
Ninja n = Ninja.newInstance()
Kai ninja = new Kai()
new Ninja = Kai("Ninja");
4
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 boolean startCourse(int students)
private static int startCourse(int students)
5
Did you read
chapter 09
of the book?
No
Yes
6
What does
NOT
correctly describe a class?
A class is a concrete real world object
A class is similar to a blueprint
A class is similar to a template
A class is a general concept of a real world object
7
What is a correct array definition?
int numbers = new int[];
int[] numbers = new int[];
int numbers = new int[20];
int[] numbers = new int[20];
8
Consider the following code in the
picture
, which next line is
NOT
possible (throws Exception)
System.out.println(myNumber[11]);
System.out.println(myNumber[1]);
System.out.println(myNumber[0]);
System.out.println(myNumber[12]);
9
How is the method called which is named exactly like the Class, here
Ninja
? (
see picture
)
Garbage Collector
Instance Method
public method
Constructor
10
Regarding
static fields
which statement is correct?
It is a part of the class, shared by all instances
Static fields can only be added to objects
It is part of an object, connected to an instance
Has for each instance of a class a different value
11
What is
NOT
a correct array definition?
int[] myIntArray = new int[]{1,2,3};
int[] myIntArray = new int[3];
int[] myIntArray= {1,2,3};
int[] myIntArray = new int[];