
JP-Quiz-1
Authored by Jeena KK
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
String og = "helloworld";
String og2 = new String(og);
System.out.println((og==og2) + " "+ (og.equals(og2)));
true true
true false
false true
false false
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
int five = 5;
int two = 2;
int total = five + (five > 6 ? ++two : --two);
1
2
4
6
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which one is not a valid statement in Java?
double num = 2.718;
double num = 2._718;
double num = 2.7_1_8;
double num = 2.718;
double num = 2._718;
double num = 2.7_1_8;
none
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many strings can be collected by Garbage Collector in the following code snippet?
public static void main(String[] fruits) {
String str1 = new String("open");
String str2 = new String("source");
String str2 = new String("opengenus");
str3 = str1;
str2 = str3;
str1 = str2;
}
0
1
2
3
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What line in this code snippet will give compilation error?
double d1 = 5f; // c1
double d2 = 5.0; // c2
float f1 = 5f; // c3
float f2 = 5.0; // c4
c1
c2
c3
c4
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code snippet?
public static void main(String... args) {
String car, bus = "petrol";
car = car + bus;
System.out.println(car); }
petrol
petrolpetrol
Compilation error
Runtime error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which code statement give compilation error?
double num1, int num2 = 1; // C1
int num1, num2; // C2
int num1, num2 = 1; // C3
int num1 = 2, num2 = 1; // C4
c1
c2
c3
c4
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
14 questions
Semi-Long Quiz#1 - SAM, NW3A-3E
Quiz
•
University
15 questions
COMP_FUND_PROG-QUIZ #2
Quiz
•
University
20 questions
NACOS Kahoot Session II
Quiz
•
University
15 questions
Microcontroller
Quiz
•
University
20 questions
COA_QUIZ_UNIT I
Quiz
•
University
15 questions
Web Dev Midterm Quiz
Quiz
•
University
17 questions
Minggu V - PKS 2 - Pemrograman C++
Quiz
•
University
16 questions
Algo Quiz
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