
Vivekquiz3
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
VIVEK PANDEY
Used 4+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class output {
public static void main(String args[])
{
double a, b,c;
a = 4.0/0;
b = 0/3.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
Infinity
Nan
0.0
All
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class increment {
public static void main(String args[])
{
int g = 4;
System.out.print(++g * 8);
}
}
40
32
8
4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class output {
public static void main(String args[])
{
try
{
System.out.println("Tata");
}
finally
{
System.out.println("Bye Bye");
}
catch(Exception e)
{
System.out.println("See you");
}
}
}
Tata
Bye Bye
See you
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class output {
public static void main(String args[])
{
String c = "Hello i love java";
boolean var;
var = c.startsWith("hello");
System.out.println(var);
}
}
True
0
1
false
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a superclass of every class in Java?
Abstract class
Interface
ArrayList
Object class
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these keywords are used for the block to be examined for exceptions?
try
catch
throw
throws
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
interface calculate
{
int VAR = 0;
void cal(int item);
}
class display implements calculate
{
int x;
public void cal(int item)
{
if (item<2)
x = VAR;
else
x = item * item;
}
}
class interfaces
{
public static void main(String args[])
{
display[] arr=new display[3];
for(int i=0;i<3;i++)
arr[i]=new display();
arr[0].cal(0);
arr[1].cal(1);
arr[2].cal(2);
System.out.print(arr[0].x+" " + arr[1].x + " " + arr[2].x);
}
}
0 1 2
0 2 4
0 1 4
0 0 4
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
python quiz
Quiz
•
6th Grade - Professio...
12 questions
Java History Characteristics Environment
Quiz
•
University
15 questions
8051-MCQ
Quiz
•
University
15 questions
Object Oriented Programming Assessment 1
Quiz
•
University
10 questions
Capa de red
Quiz
•
University
10 questions
Microsoft Windows
Quiz
•
4th Grade - University
10 questions
Industry 4.0 Unit 1
Quiz
•
University
13 questions
PWM y ADC con el MSP430F5529
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University
