
PU Day 1 assessments - Srinivas's batch

Quiz
•
Professional Development
•
Professional Development
•
Easy
training atomm
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class selection_statements
{
public static void main(String args[])
{
int var1 = 5;
int var2 = 6;
if ((var2 = 1) == var1)
System.out.print(var2);
else
System.out.print(++var2);
}
}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class TestOutput
{
public static void main(String args[])
{
int a = 10;
int b = 20;
if (a < b)
System.out.print(a + b);
else
System.out.print(a - b);
}
}
30
-10
10
20
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class CompareValues
{
public static void main(String args[])
{
int x = 15;
int y = 15;
if (x == y)
System.out.print("Equal");
else
System.out.print("Not Equal");
}
}
Equal
Error
Not Equal
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class LoopExample
{
public static void main(String args[])
{
for (int i = 0; i < 3; i++)
System.out.print(i);
}
}
}
321
None
123
012
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will the following do-while loop execute?
int i = 1;
do {
System.out.println(i);
i++;
} while(i <= 5);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class StringComparison
{
public static void main(String args[])
{
String str1 = "Hello";
String str2 = "Hello";
if (str1.equals(str2))
System.out.print("Match");
else
System.out.print("No Match");
}
}
None of the above
Match
Error
No Match
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class ConditionalCheck
{
public static void main(String args[])
{
int num = 8;
if (num % 2 == 0)
System.out.print("Even");
else
System.out.print("Odd");
}
}
Even
Odd
None of the above
Error
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Day4_Quiz_NBKR

Quiz
•
Professional Development
9 questions
Dart Q_6

Quiz
•
Professional Development
5 questions
Java_2

Quiz
•
Professional Development
13 questions
V1000 training - part 1

Quiz
•
Professional Development
10 questions
QUIZ 3DSMB 28.07

Quiz
•
Professional Development
10 questions
Python_ML_Quiz1

Quiz
•
Professional Development
15 questions
Công nghệ Java_Test1

Quiz
•
Professional Development
12 questions
Quiz Python

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