
JAVA MCQ TEST-I SLOT L31+L32
Authored by SRINIVASARAO 22PHD7042
Computers
University
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Creating an object from a class is also called ____.
Initializing
Instantiating
Interfacing
NONE
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct way of converting an int value to Integer in below Java code?
Integer in = new Integer(9);
Integer in = Integer.valueOf(9);
Integer in = new Integer("9");
NONE
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose the correct syntax of a Java Package below.
package PACKAGE_NAME;
package PACKAGE_NAME.*;
pkg PACKAGE_NAME;
pkg PACKAGE_NAME.*;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a package in Java?
A Package is a collection of files of type Java Class, Interfaces, or Abstract Class
A Package is simply a Directory or Folder with Java Classes
A Package usually contains Java Classes written for a specific purpose or problem
All the above
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the below Java program with an Interface?
interface Car {
int basePrice=1000; }
public class InterfaceTest2 implements Car {
void changePrice() {
basePrice = 2000;
System.out.print(basePrice); }
public static void main(String[] args) {
new InterfaceTest2().changePrice(); } }
1000
2000
COMPILE TIME ERROR
NONE
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An interface in Java is like a 100% ____.
abstract class
public class
inner class
anonymous class
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the below Java program
class Sweet {
void price() {
System.out.print("Sweet=$10 "); } }
class Sugar extends Sweet {
void price() {
super.price(); System.out.print("Sugar=$20"); } }
public class JavaInheritance1 {
public static void main(String[] args) {
Sugar su = new Sugar();
su.price(); } }
Sweet=$10 Sugar=$20
Sweet=$10 Sugar=$10
Sweet=$20 Sugar=$20
Compiler error
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
20 questions
Kuis Data Mining
Quiz
•
University
20 questions
IT QUIZ
Quiz
•
12th Grade - University
18 questions
C Language 101
Quiz
•
University
20 questions
C++ Bootcamp 2k24
Quiz
•
University
20 questions
NACOS Kahoot Session II
Quiz
•
University
20 questions
data warehouse-kuis 2
Quiz
•
University
17 questions
Introduction to Computer Systems: Basic elements
Quiz
•
University - Professi...
21 questions
พื้นฐาน Python ม2
Quiz
•
1st Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
7 questions
Fragments, Run-ons, and Complete Sentences
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
10 questions
DNA Structure and Replication: Crash Course Biology
Interactive video
•
11th Grade - University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
5 questions
Examining Theme
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University