Java Basics Quiz 4 - Java Basics Question and Answers | JAVA Test
Finish Quiz
0 of 20 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
Information
Let’s Play with our Java Basics Test Quiz 4 and clear your basic Java Fundamentals. By using below Free Java Basics Quiz you may test your study yourself. Java Basics Test Quiz 4 Question and Answers 2019. Java online Test Quiz 4. Java Basics Quiz 4 Free Mock Test 2019. Java Basics Test Quiz 4 Question and Answers in PDF. The Java online mock test paper is free for all students. Java Basics Test is very useful for exam preparation and getting for Rank. Java Basics Test Quiz 4 Question and Answers in English. Java Basics Mock test for topic via Basics Mode. Here we are providing Java Basics Mock Test in English Now Test your self for “Java Basics Test in English” Exam by using below quiz…
This paper has 20 questions.
Time allowed is 25 minutes.
The Java Basics Mock Test is Very helpful for all students. Now Scroll down below n click on “Start Quiz” or “Start Test” and Test yourself.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 20 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- Answered
- Review
-
Question 1 of 20
1. Question
public static void main(String args[]){ System.out.println(this); }
Correct
Incorrect
-
Question 2 of 20
2. Question
What gets the memory first? static variable or static method?
Correct
Incorrect
-
Question 3 of 20
3. Question
unary operator have right to left associativity is this______ .
Correct
Incorrect
-
Question 4 of 20
4. Question
&& have higer precedence than &.
Correct
Incorrect
-
Question 5 of 20
5. Question
An object that is not referred by any reference variable, is known as annonymous object.
Correct
Incorrect
-
Question 6 of 20
6. Question
There is naming convention that variable name must be start with capital letter this is____.
Correct
Incorrect
-
Question 7 of 20
7. Question
Can you save the java source file without any name?
Correct
Incorrect
-
Question 8 of 20
8. Question
Is JRE is smaller than JDK?
Correct
Incorrect
-
Question 9 of 20
9. Question
class S{ int x=0; S(){ x++; } public static void main(String args[]){ S s=new S(); System.out.println(s.x); } }
Correct
Incorrect
-
Question 10 of 20
10. Question
We can invoke any number of methods by one instance only.
Correct
Incorrect
-
Question 11 of 20
11. Question
A top level class may have only the following access modifier. Select the one correct answer.
Correct
Incorrect
-
Question 12 of 20
12. Question
What is the number of bytes used by Java primitive long. Select the one correct answer.
Correct
Incorrect
-
Question 13 of 20
13. Question
Assume that File is an abstract class and has toFile() method. ImageFile and BinaryFile are concrete classes of the abstract class File.
Also, assume that the method toFile() is implemented in both Binary File and Image File. A File references an ImageFile object in memory and the toFile method is called, which implementation method will be called?Correct
Incorrect
-
Question 14 of 20
14. Question
Which of the following are Java keywords. Select the four correct answers.
a. super
b. strictfp
c. void
d. synchronize
e. instanceofCorrect
Incorrect
-
Question 15 of 20
15. Question
What gets printed when the following program is compiled and run? Select the one correct answer.
class xyz {
static int i;
public static void main(String args[]) {
while (i i–;
}
System.out.println(i);
}
}Correct
The variable i gets initialized to zero. The while loop does not get executed.
Incorrect
The variable i gets initialized to zero. The while loop does not get executed.
-
Question 16 of 20
16. Question
Which of these are interfaces in the collection framework. Select the two correct answers.
a. HashMap
b. ArrayList
c. Collection
d. SortedMap
e. TreeMapCorrect
Incorrect
-
Question 17 of 20
17. Question
What happens when the following code is compiled and run. Select the one correct answer.
for(int i = 1; i for(int j = 1; j if(i assert i!=j : i;
Correct
When the if condition returns true, the assert statement also returns true. Hence AssertionError does not get generated.
Incorrect
When the if condition returns true, the assert statement also returns true. Hence AssertionError does not get generated.
-
Question 18 of 20
18. Question
What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer.
public class ShortCkt {
public static void main(String args[]) {
int i = 0;
boolean t = true;
boolean f = false, b;
b = (t || ((i++) == 0));
b = (f || ((i+=2) > 0));
System.out.println(i);
}
}Correct
Incorrect
-
Question 19 of 20
19. Question
What gets printed when the following program is compiled and run. Select the one correct answer.
class test {
public static void main(String args[]) {
int i,j,k,l=0;
k = l++;
j = ++k;
i = j++;
System.out.println(i);
}
}Correct
Incorrect
-
Question 20 of 20
20. Question
Write down the modifier of a method that makes the method available to all classes in the same package and to all the subclasses of this class.
Correct
Incorrect