Java Quiz

An engaging and colorful illustration showcasing Java programming elements, such as code snippets, a laptop, and a coffee cup, symbolizing a programmer's workspace.

Java Mastery Quiz

Test your knowledge of Java with our engaging 18-question quiz! Perfect for students, professionals, and anyone looking to brush up on their Java skills.

Key Features:

  • Multiple choice questions
  • In-depth explanations for each answer
  • Ideal for all levels of Java expertise
18 Questions4 MinutesCreated by CodingHero57
Which method is used to specify before any lines that use the PrintWriter
SetPageType()
SetContextType()
SetContentType()
SetResponseType()
Which of the following is FALSE about abstract classes in Java
If we derive an abstract class and do not implement all the abstract methods, then the derived class should also be marked as abstract using 'abstract' keyword
Abstract classes can have constructors
A class can be made abstract without any abstract method
A class can inherit from multiple abstract classes
Type IV JDBC driver is a driver
Which is written in C++
Which requires an intermediate layer
Which communicates through Java sockets
Which translates JDBC function calls into API not native to DBMS
Which of these keyword can be used in subclass to call the constructor of superclass ?
Super
This
Extent
Extends
Which of these is supported by method overriding in JAVA ?
Abstraction
Encapsulation
Polymorphism
None
What will happen if two thread of the same priority are called to be processed simultaneously ?
Anyone will be executed first lexograohically
Both of them will be executed simultaneously
None will be executed
Depends on the operating system
We can make a class abstract by
Declaring it abstract using the virtual keyword
Making at least one member function as pure virtual function
Making at least one member function as virtual function
Making all member function const
The default value of a static integer variable of a class in Java is
0
1
Garbage value
Null
-1
Among these expressions, which is(are) of type String?
“0”
€ab” + “cd”
€0’
Both (A) and (B) above (e) (A), (B) and (C) above.
The correct order of the declarations in a Java program is,
Package declaration, import statement, class declaration
Import statement, package declaration, class declaration
Import statement, class declaration, package declaration
Class declaration, import statement, package declaration
Class declaration, package declaration, import statement.
Which of the following is not a component of Java Integrated Development Environment (IDE)?
Net Beans
Borland’s Jbuilder
Symantec’s Visual Café
Microsoft Visual Fox Pro
Re-implementing an inherited method in a sub class to perform a different task from the parent class is called
Binding
Transferring
Hiding
Coupling
Extending
Identify, from among the following, the incorrect descriptions related to Java :
Java Virtual Machine translates byte code into its own system’s machine language and runs the resulting machine code
The arithmetic operations *, /, %, + and – have the same level of precedence
Comments do not cause any action to be performed during the program execution
All variables must be given a type when they are declared
Java variable names are case-sensitive
Which of the following statements about Java Threads is correct?
Every java application is not multithreaded.
Ready, running and sleeping are three states that a thread can be in during its life cycle
Java’s garbage collector runs as a high priority thread
What is the sequence of major events in the life of an applet?
Init, start, stop, destroy
Start, init , stop , destroy
Init, start , destroy, stop
Init, start, destroy
Destroy, start, init, stop.
What is the return type of the method getID() defined in AWTEvent class
Int
Long
Object
Component
Float
Is JSON is a language
True
False
What is the fundamental unit of information of writer streams?
Characters
Bytes
Files
Records
{"name":"Java Quiz", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Java with our engaging 18-question quiz! Perfect for students, professionals, and anyone looking to brush up on their Java skills.Key Features:Multiple choice questionsIn-depth explanations for each answerIdeal for all levels of Java expertise","img":"https:/images/course1.png"}
Powered by: Quiz Maker