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);
}
}
Vivekquiz3
Quiz
•
VIVEK PANDEY
•
Computers
•
University
•
4 plays
•
Hard
Student preview
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
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class output {
public static void main(String args[])
{
int a=5;
int b=10;
first:
{
second:
{
third:
{
if(a==b>>1)
break second;
}
System.out.println(a);
}
System.out.println(b);
}
}
}
5
10
5 10
10 5
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which fuction of pre defined class thread is used to check
weather current thread being checked is still running?
join()
isAlive();
Alive()
isRunning()
10.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
class output {
public static void main(String args[])
{
int x,y,z;
x=0;
y=1;
x=y=z=8;
System.out.println(x);
}
}
8
0
1
24
Explore all questions with a free account
10 questions
Java Static
Quiz
•
University
10 questions
Inheritance
Quiz
•
University
15 questions
Java Quiz based on array
Quiz
•
University
10 questions
java operators
Quiz
•
University
9 questions
Passaggio parametri
Quiz
•
University
15 questions
C# Cơ bản
Quiz
•
University
12 questions
javaquizvivek
Quiz
•
University
10 questions
Java Control Flow statements
Quiz
•
University
17 questions
CAASPP Math Practice 3rd
Quiz
•
3rd Grade
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
20 questions
math review
Quiz
•
4th Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2425sy
Quiz
•
5th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
21 questions
6th Grade Math CAASPP Practice
Quiz
•
6th Grade
13 questions
Cinco de mayo
Interactive video
•
6th - 8th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
7 questions
Food Webs and Energy Pyramids: Bedrocks of Biodiversity
Interactive video
•
11th Grade - University
25 questions
APUSH Decades Review
Quiz
•
9th Grade - University
12 questions
Scientific Notation
Quiz
•
University
96 questions
World History 1 Sol Review
Quiz
•
9th Grade - University
22 questions
Spanish subjunctive
Quiz
•
9th Grade - University
7 questions
Text Structure and Genre
Interactive video
•
4th Grade - University
20 questions
The Giver - Chapter 1-5
Quiz
•
KG - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University