Kit Library

🎯 Exam Preparation Kit

Java Important Questions

English 38 leveled MCQs Free

Shared by a Veda learner · Generated with Veda AI

Smart notes

What you'll study, topic by topic

1

for this pdf generate answers for 10 marks and make pdf

Full explanation, worked examples & memory tricks in the app

Solved paper preview

Sample questions with model answers

Every question in the paper gets a full exam-length answer in the app — organised by marks, the way a topper writes it.

10 marks Long answer

Explain the basic principles and features of Object-Oriented Programming. Compare procedural programming with object-oriented programming.

Show answer outline

OOP principles include encapsulation, inheritance, and polymorphism, contrasting with procedural programming's focus on functions.

The full exam-length answer is in the app.

10 marks Long answer

Explain the structure of a Java program with a neat example. Discuss Java tokens, statements, comments and programming style.

Show answer outline

A Java program consists of classes, methods, and statements, with tokens being keywords, identifiers, literals, and operators.

The full exam-length answer is in the app.

10 marks Long answer

Explain Java data types, variables, type casting and scope of variables with suitable examples.

Show answer outline

Java has primitive and reference data types; type casting converts between types, and variable scope defines visibility.

The full exam-length answer is in the app.

10 marks Long answer

Discuss different types of operators in Java, including arithmetic, relational, logical, bitwise and conditional operators, with examples.

Show answer outline

Operators in Java include arithmetic (+, -, *), relational (==, !=), logical (&&, ||), bitwise (&, |), and conditional (? : ).

The full exam-length answer is in the app.

10 marks Long answer

Explain decision-making statements in Java: if, if-else, nested if and switch, with suitable programs.

Show answer outline

Decision-making statements control flow based on conditions using if, if-else, nested if, and switch constructs.

The full exam-length answer is in the app.

10 marks Long answer

Explain looping statements in Java (while, do-while, for and enhanced for loop) with examples. Differentiate while and do-while.

Show answer outline

Looping statements repeat code blocks; while checks the condition first, while do-while checks after executing at least once.

The full exam-length answer is in the app.

10 marks Long answer

Write a Java program using command-line arguments or Scanner input to perform a suitable arithmetic operation. Explain the program.

Show answer outline

A program can use Scanner to read input and perform arithmetic operations based on user input.

The full exam-length answer is in the app.

10 marks Long answer

Define class and object. Explain class declaration, object creation, access control and accessing class members with an example.

Show answer outline

A class is a blueprint for objects; objects are instances of classes, created using 'new' keyword with access control modifiers.

The full exam-length answer is in the app.

10 marks Long answer

Explain constructors and their types. Write a Java program to demonstrate constructor overloading.

Show answer outline

Constructors initialize objects; types include default, parameterized, and copy constructors, with overloading allowing multiple forms.

The full exam-length answer is in the app.

10 marks Long answer

Explain method overloading with a suitable Java program. How is it different from method overriding?

Show answer outline

Method overloading allows methods with the same name but different parameters; overriding replaces superclass methods in subclasses.

The full exam-length answer is in the app.

10 marks Long answer

Explain the this keyword and its uses with a suitable Java program.

Show answer outline

The 'this' keyword refers to the current object instance, used to resolve naming conflicts and pass the current object.

The full exam-length answer is in the app.

10 marks Long answer

Discuss static variables, static methods and final variables/methods/classes with examples.

Show answer outline

Static members belong to the class rather than instances; final members cannot be modified after initialization.

The full exam-length answer is in the app.

10 marks Long answer

Explain passing objects as arguments to methods and returning objects from methods with an example.

Show answer outline

Objects can be passed by reference to methods, allowing modifications, and can be returned to provide results.

The full exam-length answer is in the app.

10 marks Long answer

Explain recursive methods and nested methods in Java with suitable examples.

Show answer outline

Recursive methods call themselves; nested methods are defined within another method, allowing scoped access.

The full exam-length answer is in the app.

10 marks Long answer

Explain one-dimensional and two-dimensional arrays in Java. Write programs to perform array traversal and matrix addition.

Show answer outline

One-dimensional arrays store linear data; two-dimensional arrays store tabular data, with traversal and addition performed using loops.

The full exam-length answer is in the app.

10 marks Long answer

Explain array declaration, initialization, memory representation, searching and sorting of arrays with suitable examples.

Show answer outline

Arrays are declared with types, initialized with values, represented in contiguous memory, and can be searched and sorted using algorithms.

The full exam-length answer is in the app.

10 marks Long answer

Define inheritance. Explain the different types of inheritance supported in Java with suitable diagrams and programs.

Show answer outline

Inheritance allows classes to inherit properties from other classes; types include single, multi-level, hierarchical, and multiple inheritance.

The full exam-length answer is in the app.

10 marks Long answer

Explain the super keyword and constructor execution in inheritance with a suitable Java program.

Show answer outline

The 'super' keyword refers to the superclass, used to access superclass methods and constructors during subclass initialization.

The full exam-length answer is in the app.

10 marks Long answer

Explain method overriding and dynamic method dispatch with a suitable Java program.

Show answer outline

Method overriding allows subclass methods to replace superclass methods, with dynamic dispatch determining method calls at runtime.

The full exam-length answer is in the app.

10 marks Long answer

Explain abstract classes and interfaces. Differentiate between an abstract class and an interface.

Show answer outline

Abstract classes can have both abstract and concrete methods; interfaces only declare methods, requiring implementation in classes.

The full exam-length answer is in the app.

10 marks Long answer

Explain multiple inheritance through interfaces. Write a Java program to implement multiple interfaces.

Show answer outline

Multiple inheritance is achieved through interfaces, allowing a class to implement multiple interfaces and inherit their behaviors.

The full exam-length answer is in the app.

10 marks Long answer

Explain functional interfaces, default methods, static methods and annotations in Java.

Show answer outline

Functional interfaces have a single abstract method; default methods provide implementations, while annotations add metadata.

The full exam-length answer is in the app.

10 marks Long answer

What is a package? Explain how to create, compile and import a user-defined package in Java.

Show answer outline

Packages group related classes; created using 'package' keyword, compiled with 'javac', and imported using 'import' statement.

The full exam-length answer is in the app.

10 marks Long answer

Explain important classes of java.lang and java.util packages, including Object, Math, Wrapper, Random and Formatter.

Show answer outline

java.lang includes fundamental classes like Object and Math; java.util provides utility classes like Random and Formatter.

The full exam-length answer is in the app.

10 marks Long answer

Explain autoboxing and unboxing with suitable Java examples. Discuss wrapper classes.

Show answer outline

Autoboxing converts primitives to wrappers; unboxing converts wrappers to primitives, with wrapper classes providing object representation.

The full exam-length answer is in the app.

10 marks Long answer

Explain the exception-handling mechanism in Java. Describe try, catch, finally, throw and throws with examples.

Show answer outline

Exception handling uses try-catch blocks to manage errors; finally executes regardless of exceptions, throw/throws handle specific exceptions.

The full exam-length answer is in the app.

10 marks Long answer

Differentiate checked and unchecked exceptions. Explain the exception hierarchy with suitable examples.

Show answer outline

Checked exceptions require handling; unchecked exceptions do not, with a hierarchy from Throwable to Error and Exception.

The full exam-length answer is in the app.

10 marks Long answer

Explain multiple catch blocks and user-defined exceptions with a Java program.

Show answer outline

Multiple catch blocks handle different exceptions; user-defined exceptions extend Exception class for custom error handling.

The full exam-length answer is in the app.

10 marks Long answer

Explain Java I/O streams. Differentiate byte streams and character streams with examples.

Show answer outline

Java I/O streams handle input/output; byte streams process binary data, character streams process text data.

The full exam-length answer is in the app.

10 marks Long answer

Write a Java program to read data from and write data to a text file. Explain the classes used.

Show answer outline

FileReader and FileWriter classes are used to read and write text files in Java, demonstrating file handling.

The full exam-length answer is in the app.

10 marks Long answer

Explain the String class and its important methods for comparison, searching, extraction and modification with examples.

Show answer outline

The String class provides methods like compareTo, indexOf, substring, and replace for string manipulation.

The full exam-length answer is in the app.

10 marks Long answer

Differentiate String, StringBuffer and StringBuilder. Explain commonly used StringBuffer methods.

Show answer outline

String is immutable; StringBuffer and StringBuilder are mutable, with StringBuffer being synchronized for thread safety.

The full exam-length answer is in the app.

10 marks Long answer

Explain multithreading in Java and its advantages. Describe the life cycle/states of a thread with a neat diagram.

Show answer outline

Multithreading allows concurrent execution of threads, improving performance; thread states include new, runnable, blocked, waiting, and terminated.

The full exam-length answer is in the app.

10 marks Long answer

Explain the two ways of creating threads in Java: extending Thread class and implementing Runnable interface, with programs.

Show answer outline

Threads can be created by extending Thread class or implementing Runnable interface, allowing different approaches to thread execution.

The full exam-length answer is in the app.

10 marks Long answer

Explain thread priorities, synchronization, inter-thread communication and race conditions in Java.

Show answer outline

Thread priorities determine execution order; synchronization prevents data inconsistency; inter-thread communication manages thread interactions.

The full exam-length answer is in the app.

10 marks Long answer

Explain JDBC architecture and the steps involved in establishing a database connection. Describe the ResultSet interface.

Show answer outline

JDBC architecture connects Java applications to databases; steps include loading driver, establishing connection, creating statements, and executing queries.

The full exam-length answer is in the app.

10 marks Long answer

Explain JavaFX application window structure and Scene Builder. Describe how to display text and images in a JavaFX application.

Show answer outline

JavaFX applications have a stage and scene structure; Scene Builder allows visual design, displaying text and images using UI controls.

The full exam-length answer is in the app.

10 marks Long answer

Explain event handling in JavaFX. Discuss event handlers, mouse events and layout of nodes in a scene graph.

Show answer outline

Event handling in JavaFX uses event handlers for user interactions, with mouse events triggering actions and nodes arranged in a scene graph.

The full exam-length answer is in the app.

Study it properly — free, in the app

The full Veda Bites deck, complete notes, spaced-repetition flashcards, leveled MCQs, tests and games for this kit — plus Daily Facts and the Arena, every day.