Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

OOPS with Java Exam/Interview Preparation

Rating
-
Sold
-
Pages
45
Grade
A+
Uploaded on
28-12-2025
Written in
2024/2025

This OOPS with Java Question & Answer PDF is a complete, exam-focused study resource designed for BCA, BTech, and university semester exams (including MAKAUT syllabus). The content is structured in a clear, easy-to-understand Q&A format, making it ideal for quick revision, last-minute preparation, viva, and interviews. The notes cover all core Object-Oriented Programming concepts in Java, including Class & Object, Encapsulation, Inheritance, Polymorphism, Abstraction, Interfaces, Constructors, Method Overloading & Overriding, Access Modifiers, Java Keywords, Packages, Exception Handling. This PDF also includes MCQs, viva questions, short and long answer questions, practical examples, making it a one-stop solution for both theory and practice. The language is simple, student-friendly, and suitable even for beginners.

Show more Read less
Institution
Course

Content preview

1|Page


OOPS WITH JAVA EXAM PREP –
⬛ Short Answer Questions & Answers (Java Syllabus – 1 Mark)


1. Introduction to Java
1. Q: What is Java?
A: Java is an object-oriented, platform-independent programming
language.
2. Q: Name two features of Java.
A: Platform-independent, Object-oriented.
3. Q: What is JVM?
A: JVM (Java Virtual Machine) executes Java bytecode on any platform.
4. Q: What is the difference between PATH and CLASSPATH?
A: PATH specifies location of executables, CLASSPATH specifies
location of classes/libraries.
5. Q: What is bytecode?
A: Intermediate code generated by the Java compiler, executed by JVM.


2. Basics of Java Programming
6. Q: Name two primitive data types in Java.
A: int, float.
7. Q: What is a static variable?
A: A variable shared by all objects of the class.
8. Q: What is a final variable?
A: A constant variable whose value cannot be changed once assigned.
9. Q: Which package provides BigInteger class?
A: java.math.
10. Q: Name two control structures in Java.
A: if-else, switch.

,2|Page


3. Object-Oriented Programming Concepts
11. Q: What are access modifiers in Java?
A: public, private, protected, default.
12. Q: What is encapsulation?
A: Wrapping data and methods together in a class.
13. Q: What is abstraction?
A: Hiding implementation details and showing only essential features.
14. Q: What is constructor chaining?
A: Calling one constructor from another within the same or parent class.
15. Q: What keyword is used to call a constructor from another constructor in
the same class?
A: this().


4. Inheritance and Polymorphism
16. Q: What is inheritance?
A: The mechanism of acquiring properties and methods from another
class.
17. Q: Which keyword is used for inheritance?
A: extends.
18. Q: What is method overloading?
A: Defining multiple methods with the same name but different
parameters.
19. Q: What is method overriding?
A: Redefining a parent class method in a child class with the same
signature.
20. Q: Can we override a static method?
A: No.


5. Arrays and Strings
21. Q: How to declare a single-dimensional array?
A: int arr[] = new int[5];

,3|Page


22. Q: Which class provides utility methods for arrays in Java?
A: java.util.Arrays.
23. Q: Name two methods of the Arrays class.
A: sort(), binarySearch().
24. Q: Difference between String and StringBuilder?
A: String is immutable, StringBuilder is mutable.
25. Q: Which class is thread-safe: StringBuffer or StringBuilder?
A: StringBuffer.


6. Interfaces and Abstract Classes
26. Q: Can an interface have concrete methods?
A: No (except default and static methods from Java 8).
27. Q: Can we create an object of an abstract class?
A: No.
28. Q: How is multiple inheritance achieved in Java?
A: Using interfaces.


7. Exception Handling
29. Q: What are checked exceptions?
A: Exceptions checked at compile time (e.g., IOException).
30. Q: What are unchecked exceptions?
A: Exceptions checked at runtime (e.g., NullPointerException).
31. Q: Which block always executes in exception handling?
A: finally.
32. Q: Which keywords are used to declare exceptions?
A: throw, throws.
33. Q: What is a custom exception?
A: A user-defined exception extending Exception class.

, 4|Page


8. File I/O and Serialization
34. Q: Which package is used for file handling in Java?
A: java.io.
35. Q: What is serialization?
A: The process of converting an object into a byte stream.
36. Q: Which interface must a class implement to be serializable?
A: Serializable.
37. Q: Which classes are commonly used for file reading and writing?
A: FileReader, FileWriter, BufferedReader, BufferedWriter.


9. Multithreading
38. Q: Which two ways can we create a thread in Java?
A: Extending Thread class, implementing Runnable interface.
39. Q: What are the states of a thread lifecycle?
A: New, Runnable, Running, Waiting, Terminated.
40. Q: Which keyword is used for synchronization?
A: synchronized.
41. Q: What methods are used for inter-thread communication?
A: wait(), notify(), notifyAll().


5 MARKS –
Module – 1


Q1. What are the key features of Java?
Answer:
The key features of Java are:
1. Simple: Easy to learn and use with clear syntax.
2. Object-Oriented: Everything is an object; supports classes, inheritance,
polymorphism, and encapsulation.
3. Platform-Independent: Write Once, Run Anywhere (WORA) using
bytecode executed by JVM.

Written for

Institution
Course

Document information

Uploaded on
December 28, 2025
Number of pages
45
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$29.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
ankitmondal

Get to know the seller

Seller avatar
ankitmondal The Heritage Academy
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 months
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions