Java Programming 1
Questions Result & StatisticsQuiz-summary
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
Questions
Instruction:
- Total number of questions : 20
- Time allotted : 25 minutes.
- Each question carry 1 mark, no negative marks.
- Click the “Finish quiz” button given in bottom of this page to submit your answer.
- Test will be submitted automatically if the time expired.
- Don’t refresh the page.
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
Marks : 0 of 20 questions answered correctly | ||
Total number of questions | : | 20 |
Number of currect answered | : | 0 |
Your time | : |
|
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
- Not categorized 0%
-
Thank you for submitting online test!
- 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
1 pointsCorrectAnswer : A
Explanation : No answer description.
IncorrectAnswer : A
Explanation : No answer description.
-
Question 2 of 20
2. Question
1 pointsCorrectAnswer : C
Explanation : No answer description.
IncorrectAnswer : C
Explanation : No answer description.
-
Question 3 of 20
3. Question
1 pointsCorrectAnswer : D
Explanation : No answer description.
IncorrectAnswer : D
Explanation : No answer description.
-
Question 4 of 20
4. Question
1 pointsCorrectAnswer : A
Explanation : An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted to int before any calculation is done.
IncorrectAnswer : A
Explanation : An expression involving bytes, ints, shorts, literal numbers, the entire expression is promoted to int before any calculation is done.
-
Question 5 of 20
5. Question
1 points.
What is the output of this program?
class mainclass {
public static void main(String args[])
{
char a = ‘A’;
a++;
System.out.print((int)a);
}
}
CorrectAnswer : A
Explanation : ASCII value of ‘A’ is 65, on using ++ operator character value increments by one.
IncorrectAnswer : A
Explanation : ASCII value of ‘A’ is 65, on using ++ operator character value increments by one.
-
Question 6 of 20
6. Question
1 pointsCorrectAnswer : A
Explanation : interface is a valid keyword.
IncorrectAnswer : A
Explanation : interface is a valid keyword.
-
Question 7 of 20
7. Question
1 pointsCorrectAnswer : A
Explanation : No answer description.
IncorrectAnswer : A
Explanation : No answer description.
-
Question 8 of 20
8. Question
1 pointsCorrectAnswer : A
Explanation : Option A sets the String reference to null.
IncorrectAnswer : A
Explanation : Option A sets the String reference to null.
-
Question 9 of 20
9. Question
1 pointsCorrectAnswer : D
Explanation : The word “native” is a valid keyword, used to modify a method declaration.
IncorrectAnswer : D
Explanation : The word “native” is a valid keyword, used to modify a method declaration.
-
Question 10 of 20
10. Question
1 points.
What is the output of this program?
class mainclass {
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
if (var1)
System.out.println(var1);
else
System.out.println(var2);
}
}
CorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 11 of 20
11. Question
1 pointsCorrectAnswer : C
Explanation : Boolean can only be assigned true or false literals.
IncorrectAnswer : C
Explanation : Boolean can only be assigned true or false literals.
-
Question 12 of 20
12. Question
1 pointsCorrectAnswer : C
Explanation : James Gosling is the creator of JAVA. He is called the Father of Java Programming Language .
IncorrectAnswer : C
Explanation : James Gosling is the creator of JAVA. He is called the Father of Java Programming Language.
-
Question 13 of 20
13. Question
1 pointsCorrectAnswer : C
No answer description.
IncorrectAnswer : C
No answer description.
-
Question 14 of 20
14. Question
1 pointsCorrectAnswer : D
No answer description.
IncorrectAnswer : D
No answer description.
-
Question 15 of 20
15. Question
1 pointsCorrectAnswer : B
Explanation : A .java file is converted into .class file using javac command.
IncorrectAnswer : B
Explanation : A .java file is converted into .class file using javac command.
-
Question 16 of 20
16. Question
1 pointsCorrectAnswer : A
No answer description.
IncorrectAnswer : A
No answer description.
-
Question 17 of 20
17. Question
1 pointsCorrectAnswer : C
Explanation : An identifier is a name given to a variable, class or method.
IncorrectAnswer : C
Explanation : An identifier is a name given to a variable, class or method.
-
Question 18 of 20
18. Question
1 pointsCorrectAnswer : C
Explanation : Double is the default data type of a decimal number in Java.
IncorrectAnswer : C
Explanation : Double is the default data type of a decimal number in Java.
-
Question 19 of 20
19. Question
1 points.
What would be the output of the following program?
class Sample
{
public static void main(String[] args)
{
int i;
System.out.println(“i is not used in this program!”);
}
}
CorrectAnswer : A
Explanation : variable ‘i’ is not initialized but is not used anywhere.
IncorrectAnswer : A
Explanation : variable ‘i’ is not initialized but is not used anywhere.
-
Question 20 of 20
20. Question
1 points.
What would be the output of the following program?
class ByteSize
{
public static void main(String[] args)
{
byte b=128;
System.out.println(b);
}
}
CorrectAnswer : C
Explanation : A byte variable range between -128 to 127. Hence it can not be assigned 128 .
IncorrectAnswer : C
Explanation : A byte variable range between -128 to 127. Hence it can not be assigned 128 .