Quiz
Java quiz
Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.
Fragen in diesem Quiz (90)
1Can you use == to show that 2 strings are equal?
- ARichtig
- BFalsch
2Do you have to take care of the garbage collection by yourself?
- ARichtig
- BFalsch
3How do you write a switch?
- Aswitch() {}
- BSwitch() {}
- Cswitch{}{}
- Dswitch[]{}
4Is this correct:
string s = "Is this correct"?- ARichtig
- BFalsch
5Is "if else" a decision or repetition control structure?
- Adecision
- Brepetition
6Will this compile:
int i = 0;
if (i = 0){...}- ARichtig
- BFalsch
7How do you get the array length?
- A.size()
- B.length()
- C.getLength()
- D.longitude()
8An object is created with the keyword "new".
- ARichtig
- BFalsch
9How do you call static methods?
- A[objectName].[methodName]
- B[className].[methodName]
- C[className].[objectName].[methodName]
10How are primitive data types passed to a method?
- Aby reference
- Bby value
11Which keyword do you have to use to show that you inherited from a normal class?
- Anext
- Bextends
- Cimplements
- Dadds
12Where does the super-constructor call stand in the constructor?
- Aat last
- Bafter implementing the given values
- Cat first
13Are down-casts save?
- ARichtig
- BFalsch
14Can you create an object from an abstract class?
- ARichtig
- BFalsch
15What kind of class is Collection?
- Aabstract class
- Bnormal class
- Cinterface
16How does a stack work?
- Afirst in first out
- Blast in first out
- Clast in last out
- DNone of these
17How do you go over a collection?
- Areplicator
- Bsupergazer
- Cprogressator
- Diterator
18What kind of control structures are loops?
- ADecision
- BRepetition
- CHeritage
- DImplementation
19Which kind of loops exist?
- Afor-while loop
- Bfor loop
- Cdo-while loop
- Dswitch loop
- Ewhile loop
20In a "while" loop the while statement stands at the end.
- ARichtig
- BFalsch
21The while loop is executed at least once.
- ARichtig
- BFalsch
22The "do-while" loop is executed at least once.
- ARichtig
- BFalsch
23Loops can enter an infinity loop.
- ARichtig
- BFalsch
24Will this compile?
do{
...
}while(boolean_expression)- ARichtig
- BFalsch
25How many semicolons do you put in the for()-statement?
- A0
- B1
- C2
- D3
26What is the best loop if you know how often the repetetive control structure is needed?
- Awhile loop
- Bdo-while loop
- Cfor loop
27The "for" loop will be executed at least once.
- ARichtig
- BFalsch
28What are branching statements doing?
- Aredirect program flow
- Bcatch exceptions
- Cacts as the end of the program
- Dcreates an object
29In a switch what is break doing?
- Askips the just next case
- Bjumps out of the switch
- Cinterrupts the case
30The break statement skips the current iteration of a loop goes to the head of the loop again.
- ARichtig
- BFalsch
31The continue statement jumps out of the loop.
- ARichtig
- BFalsch
32Every method must return a value.
- ARichtig
- BFalsch
33The return statement exits in the method header.
- ARichtig
- BFalsch
34An array can contain many different values of the same type?
- ARichtig
- BFalsch
35An array can contain many different variables of different types at the same time
- ARichtig
- BFalsch
36An array cannot contain nothing at all?
- ARichtig
- BFalsch
37Both of these declarations do the same:
int [] ages;
int ages[];- ARichtig
- BFalsch
38How do you instantiate an array?
- Aint ages[] = new int[100];
- Bint ages[] = int [100];
- Cint ages[] = new int(100);
- Dint ages[] = ages[100];
39The first position of an array is 1.
- ARichtig
- BFalsch
40You can just create arrays for primitive data type.
- ARichtig
- BFalsch
41Is it possible to resize an array?
- ARichtig
- BFalsch
42for(int i=0;i<=arr.length;i++){...} with this you can access the whole array.
- ARichtig
- BFalsch
43The coding in the question before will throw an exception if it is not empty which will that be.
for(int i=0;i<=arr.length;i++){
arr[i] = i};- ANullpointer
- BNot a Number
- CArraylength exception
- DOutofBOundary exception
44Is it possible to put arrays in arrays?
- ARichtig
- BFalsch
45Is it possible to put a third,forth.. array in. So that there will be multible levels of arrays?
- ARichtig
- BFalsch
46Can you access the two dimensional array dogs[][] like this (Given there is data in this array?):
System.out.print( dogs[0][0] );- ARichtig
- BFalsch
47Runtime Errors are not displayed until the program is executed.
- ARichtig
- BFalsch
48public static void main( Strings[] args ) is the starting point of a program.
- ARichtig
- BFalsch
49Identifiers are not case-sensitive.
- ARichtig
- BFalsch
50Choose the possible beginning of an identifier.
- Aunderscore (_)
- Bnumber (5)
- Cdollar sign($)
- Dpercentage sign(%)
51The name of a class should start with a capitalized letter.
- ARichtig
- BFalsch
52It is possible to name a method "If()"
- ARichtig
- BFalsch
53Name the eight primitive data types of Java. Order them starting with the "smallest" [blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end],[blank_start]__________[blank_end]
- Aboolean
- Bchar
- Cbyte
- Dshort
- Einteger
- Flong
- Gfloat
- Hdouble
54It is possible to extend the value of an Integer by appending the A.
- ARichtig
- BFalsch
55float test = 4.356789;
is a...?- Afloat
- Bdouble
- Cint
- Dlong float
- Enothing
56A variable needs
- Adata type
- Bname
- Cvalue
57You can print out variable data with:
System.out.println();- ARichtig
- BFalsch
58Reference Variable store in the memory location:
- Athe data
- Bthe adress
- Cboth
59How is the order of the compliation?
Opt1 + Opt2 * Opt3 - Opt4- Afrom left to right
- Bright to left
- Caddition, substraction, multiplication
- Dmulitplication, addition, substraction
60What does the arthmetic operator "%" do?
- Adivides 2 values
- Bcomputes the remainer of dividing 2 values
- Cchooses the bigger value
61If you add int a and float b, the result is:
- Aint
- Bfloat
- Cdouble
- Dit is not possible
62count++; is the same as
- Acount = count+1;
- Bcount = 1;
- Ccount += 1;
- Dcount = count-1;
63There is not difference between a++ and ++a
- ARichtig
- BFalsch
64The output of relational operators is Integer.
- ARichtig
- BFalsch
65The result of true&&true is
- ARichtig
- BFalsch
66The result of false||true is
- ARichtig
- BFalsch
67The "&" operator does not always evaluates both variables.
- ARichtig
- BFalsch
68The result of false^true is
- ARichtig
- BFalsch
69The logical operator "!" turns the value into
- Anegative
- Bthe opposite
- Cpositive
70The conditional operator consists out of
- A2 arguments
- B4 arguments
- C3 arguments
71&& is evaluated before ||
- ARichtig
- BFalsch
72Decision control structures are for example:
- Aif-else
- Bswitch
- Cfor loop
- Dwhile loop
73Statement2 will only executed if the expression is true
if(boolean_expression)
statement1; statement2;- ARichtig
- BFalsch
74An if-part always needs an else-part.
- ARichtig
- BFalsch
75Where is/are the error(s)?
if(boolean_expression1){
statement1;}
elseif(boolean_expression2){
statement2;}
else{
statement3;}- Aa ";" is missing
- Bonly one boolean_expression is possible
- Celse if needs to be written like this
- Da bracket is missing
- Ethere is none
76Does this compile?
if(number = 1){
statement1;}
else{
statement2;}- Ayes, without restriction
- Byes, but it will always go into the if-part
- Cno, because the "=" is not comparing
- Dno, because the else-if-part is missing
77A switch-statement allows branching multiple outcomes.
- ARichtig
- BFalsch
78Every case in a switch-statement needs a "break" at the end.
- ARichtig
- BFalsch
79The more general cases in a switch-statement should be at the beginning.
- ARichtig
- BFalsch
80The default-part in a switch-statement is always necessary.
- ARichtig
- BFalsch
81Where is/are the error(s)?
switch( switch_expression ){
case case1:
statement1;
statement2;
break;
case case2:
statement1;
break;
}- Athe curly braces are missing
- Bthere are too many statements in case1
- Cthe default is missing
- Dthere is none
82The if-else and switch statement are similar because they make decisions based on a single value.
- ARichtig
- BFalsch
83Every java class is a subclass of java.lang.Object.
- ARichtig
- BFalsch
84All methods of the class java.util.ArrayList are synchronized.
- ARichtig
- BFalsch
85The class java.lang.Throwable hands directly down to
- Ajava.lang.Exceptions
- Bjava.lang.Error
- Cjava.lang.Mistake
86Packages are used for:
- Aconcentration of physical structure
- Bencapsulation
- Cconcentration of logical structure
87If a class has a natural order and needs to be sorted, you should use a Comparator object.
- ARichtig
- BFalsch
88The class String has immutable objects.
- ARichtig
- BFalsch
89It is advised to use the equals-method of StringBuffer objects because they are mutable.
- ARichtig
- BFalsch
90Every primitive type of data has a wrapper class.
- ARichtig
- BFalsch
Informationen
- Beschreibung
- Quiz am Java quiz, erstellt von Daniel Schwarz am 29/03/2018.
- Autor
- Daniel Schwarz
- Sprache
- English
- Aufrufe
- 8
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz