Creating an object from a class is also called ____.

JAVA MCQ TEST-I SLOT L31+L32

Quiz
•
Computers
•
University
•
Medium
SRINIVASARAO 22PHD7042
Used 9+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
JDBC

Quiz
•
University
15 questions
Unit 2 Inheritance in Java

Quiz
•
12th Grade - University
20 questions
Quiz 2 PBO

Quiz
•
University
20 questions
JAVA Basics Quiz

Quiz
•
University
15 questions
002_Java Methods

Quiz
•
12th Grade - University
20 questions
Code Junction 4

Quiz
•
University
15 questions
II CSM A & B

Quiz
•
University
25 questions
Java Quiz

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade