Kit Library

🎯 Exam Preparation Kit

OOP-I Exam Preparation

English 25 leveled MCQs Free

Shared by a Veda learner · Generated with Veda AI

Smart notes

What you'll study, topic by topic

1

OOP-I Exam Preparation

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.

7 marks Long answer

Write a java program to sum first n natural numbers.

Show answer outline

Use a loop to iterate from 1 to n and sum the numbers.

The full exam-length answer is in the app.

7 marks Long answer

With the help of example explain use of break and continue in java.

Show answer outline

Break exits the loop; Continue skips the current iteration.

The full exam-length answer is in the app.

7 marks Long answer

Write a code segment to get input from keyboard in java. Import all necessary packages.

Show answer outline

Use Scanner class from java.util package.

The full exam-length answer is in the app.

7 marks Long answer

Write a java program for adding two 2x2 matrix.

Show answer outline

Use nested loops to sum corresponding elements.

The full exam-length answer is in the app.

7 marks Long answer

Write a java program to sort an array of five integer in descending order.

Show answer outline

Use Arrays.sort() in reverse order.

The full exam-length answer is in the app.

7 marks Long answer

List various classes of java.io package used for Text IO.

Show answer outline

BufferedReader, FileReader, PrintWriter.

The full exam-length answer is in the app.

7 marks Long answer

List various classes of java.io package used for Binary IO.

Show answer outline

FileInputStream, FileOutputStream, ObjectInputStream.

The full exam-length answer is in the app.

7 marks Long answer

Draw and explain life cycle of Thread.

Show answer outline

Thread lifecycle includes New, Runnable, Blocked, Waiting, Timed Waiting, and Terminated states.

The full exam-length answer is in the app.

7 marks Long answer

Show the two methods which are used to create a thread in Java.

Show answer outline

Extending Thread class and implementing Runnable interface.

The full exam-length answer is in the app.

4 marks Medium answer

Explain the syntax of loops in java.

Show answer outline

Loops in Java include for, while, and do-while with specific syntax for each.

The full exam-length answer is in the app.

4 marks Medium answer

Write java syntax to create array with five integers. (use array initialization)

Show answer outline

int[] arr = {1, 2, 3, 4, 5};

The full exam-length answer is in the app.

4 marks Medium answer

Write a java syntax to create a two dimensional array with 3 row and 3 columns. Also initialize the array.

Show answer outline

int[][] arr = {{1,2,3}, {4,5,6}, {7,8,9}};

The full exam-length answer is in the app.

4 marks Medium answer

Define exception. Explain throw and throws.

Show answer outline

An exception is an event that disrupts normal program flow; 'throw' creates an exception, 'throws' declares it.

The full exam-length answer is in the app.

4 marks Medium answer

With the help of example explain the priority queue in java.

Show answer outline

PriorityQueue orders elements based on priority; example: storing tasks with different priorities.

The full exam-length answer is in the app.

4 marks Medium answer

List various static methods of List.

Show answer outline

Methods include 'of()', 'copyOf()', 'fill()', 'sort()'.

The full exam-length answer is in the app.

2 marks Short answer

Define Object, Class and Instance

Show answer outline

Object is an instance of a class; Class is a blueprint for creating objects; Instance is a specific realization of a class.

The full exam-length answer is in the app.

2 marks Short answer

List any four features of Object oriented programming language.

Show answer outline

Encapsulation, Inheritance, Polymorphism, Abstraction.

The full exam-length answer is in the app.

2 marks Short answer

List and explain any three category of operator in java.

Show answer outline

Arithmetic, Relational, and Logical operators.

The full exam-length answer is in the app.

2 marks Short answer

Explain abstract method using example.

Show answer outline

An abstract method has no body and must be implemented in derived classes.

The full exam-length answer is in the app.

2 marks Short answer

Explain abstract class with the help of example.

Show answer outline

An abstract class cannot be instantiated and may contain abstract methods.

The full exam-length answer is in the app.

2 marks Short answer

Compare run time and compile time exception.

Show answer outline

Compile-time exceptions are checked at compile time; run-time exceptions occur during execution.

The full exam-length answer is in the app.

2 marks Short answer

List various UI Controls in javaFX.

Show answer outline

Button, Label, TextField, and ComboBox.

The full exam-length answer is in the app.

2 marks Short answer

With the help of example explain handling events in javaFX.

Show answer outline

Event handling in JavaFX involves using EventHandlers to respond to user actions.

The full exam-length answer is in the app.

2 marks Short answer

Compare Set and List in java.

Show answer outline

Set does not allow duplicates; List allows duplicates and maintains order.

The full exam-length answer is in the app.

2 marks Short answer

Compare Vector and Stack.

Show answer outline

Vector is synchronized; Stack is a subclass of Vector with LIFO behavior.

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.