
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Core Java. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Answer : A
Explaination
True, Static functions can be accessed via class name or via null reference.
Answer : C
Explaination
The float data type is represented by single-precision 32-bit IEEE 754 floating point.
Answer : C
Explaination
long variable has default value of 0L if defined as an instance/static variable.
Answer : B
Explaination
boolean variable has default value of false if defined as an instance/static variable.
Q 5 - What is instance variable?
A - Instance variables are static variables within a class but outside any method.
B - Instance variables are variables defined inside methods, constructors or blocks.
C - Instance variables are variables within a class but outside any method.
Answer : C
Explaination
Instance variables are variables within a class but outside any method. These variables are instantiated when the class is loaded.
Answer : B
Explaination
No, this is not possible.
Q 7 - Method Overloading is an example of
Answer : A
Explaination
Method Overloading is example of static binding.
Q 8 - What happens when thread's yield() method is called?
A - Thread returns to the ready state.
Answer : A
Explaination
When a task invokes its yield() method, it returns to the ready state.
Answer : A
Explaination
Yes, try statements be nested.
Q 10 - Which of the following is Faster, StringBuilder or StringBuffer?
Answer : A
Explaination
StringBuilder is faster than StringBuffer.