
JavaDemo1
Quiz
•
Computers
•
Professional Development
•
Medium
Shefali Arora
Used 6+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which one of these lists contains only Java programming language keywords?
class, if, void, long, Int, continue
goto, instanceof, native, finally, default, throws
try, virtual, throw, final, volatile, transient
strictfp, constant, super, implements, do
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is a valid keyword in java?
interface
string
Float
unsigned
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is a valid declarations of a String?
String s2 = 'null';
String s1 = null;
String s3 = (String) 'abc';
String s4 = (String) '\ufeed';
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code:
class Test {
public static void main(String[] args) {
for(int i = 0; 1; i++) {
System.out.println("Hello");
break;
}
}
}
Prints Hello once
Prints Hello infinite times
Prints nothing
Compiler error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
class Test {
public static void main(String[] args) {
for(int i = 0; 1; i++) {
System.out.println("Hello");
break;
}
}
}
0
20
Compiler Error
Prints Nothing
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
class Main {
public static void main(String args[]) {
try {
throw 10;
}
catch(int e) {
System.out.println("Got the Exception " + e);
}
}
}
Got the Exception 10
Got the Exception 0
Compiler error
None of these
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following?
class Main{public static void main (String[] args) {
try
{
int x = 0;
int y = 5 / x;
}
catch (Exception e)
{
System.out.println("Exception");
}
catch (ArithmeticException ae)
{
System.out.println(" Arithmetic Exception");
}
System.out.println("finished");
}};
finished
Compilation error
Exception
Arithmetic exception
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
CS402 T04
Quiz
•
Professional Development
16 questions
JavaScript ( review I )
Quiz
•
Professional Development
10 questions
PreTrainingClassesObjectsMethods
Quiz
•
Professional Development
15 questions
Javascript Datatypes and Variables(Kushal Das)
Quiz
•
Professional Development
10 questions
FUNDAMENTOS DE PROGRAMACIÓN VI
Quiz
•
Professional Development
10 questions
IT A OOPs Lab Quiz1
Quiz
•
Professional Development
10 questions
04 JavaScript Einführung
Quiz
•
Professional Development
10 questions
IT ENGLISH: Research Project Topics - Java and JavaScript
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade