0% found this document useful (0 votes)
68 views

Java Question Bank 24-25

The document is a comprehensive Java question bank for the academic year 2024-2025, organized into five modules covering key concepts of Java programming, including Object-Oriented Programming principles, data types, methods, exception handling, multithreading, and Java collections. Each module contains a series of questions and programming tasks designed to assess understanding and practical application of Java concepts. The content is aimed at helping students prepare for exams and practical assessments in Java programming.

Uploaded by

S.Y Suprabhath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Java Question Bank 24-25

The document is a comprehensive Java question bank for the academic year 2024-2025, organized into five modules covering key concepts of Java programming, including Object-Oriented Programming principles, data types, methods, exception handling, multithreading, and Java collections. Each module contains a series of questions and programming tasks designed to assess understanding and practical application of Java concepts. The content is aimed at helping students prepare for exams and practical assessments in Java programming.

Uploaded by

S.Y Suprabhath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

JAVA QUESTION BANK 24-25

Module 1:
1. Explain key principles of Object-Oriented Programming in detail?
2. Explain characteristics of java.
3. Define class and object and explain the difference between class and object.
4. Calculator program by demonstrating switch statement
5. Simple banking system where a user can check balance, deposit money, and
withdraw money using class, constructor, constructor overloading concepts.(From
java lab)
6. Explain Access Modifiers with example
7. Write Primitive data types in Java? Provide examples of each.
8. What is a method in Java? How do you define and call a method in java
9. Difference between constructor and a method
10. Program Employee (from java lab program, similarly Student)
11. Math class and basic mathematical operations
12. Explain arrays in Java? How do you declare and initialize an array?
13. Write a java program to find the length of an array in Java?
14. Write a program to reverse a digit.
15. Linear search in an array.
16. Looping statements with examples
17. Write the steps to create and instantiate different types of arrays in Java with
examples.
18. What are Selection statements in Java? Explain with examples.
Module 2:
1. Polymorphism in Java and its types? Explain the difference between compile-time
and runtime polymorphism.
2. Concept of Method overriding with an example.
3. Super keyword and this keyword with example.
4. Dynamic binding in Java. Provide an example.
5. Explain packages. How to import packages.
6. Difference between built in package and user defined package
7. Static variables. Diff between class and static variables. Provide an example
8. Difference between static and non-static methods. Provide an example
9. Pgm to count the vowels in a string
10. Pgm to count the sum of digits by taking the input from the scanner class.
11. Explain the concept of object casting in Java? Explain the difference between
upcasting and downcasting with an example.
12. instanceof operator used for in Java? How does instanceof help in type checking
before performing a cast?
13. String and StringBuilder/StringBuffer differences in Java?
14. five methods of StringBuffer class with examples
15. five methods of StringBuilder class with examples
16. five methods of StringTokenizer class with examples
17. five methods of StringJoiner class
18. Write in detail built-in and user defined packages with examples
Module 3:
1. Explain Abstraction? How do abstract classes and interfaces help achieve
abstraction in Java with examples.
2. Write the difference between abstract class and interface in java.
3. Explain the final keyword and static keyword with example.
4. Explain Method overriding with Examples.
5. Implement hierarchical inheritance in Java
6. Write a java program demonstrating the concept of inheritance, where a parent
class Animal has a method speak (), and child classes Dog and Cat override the
speak () method. Identify what type of inheritance is this.
7. Explain interface with example.
8. Explain checked and unchecked exceptions with examples.
9. Write a java program to demonstrate throw and throws clause
10. Explain exception handling in Java, and why is it important for program stability?
11. Write a Java program to create an abstract class Employee with abstract methods
calculateSalary () and displayInfo (). Create subclasses Manager and Programmer
that extend the Employee class and implement the respective methods to calculate
salary and display information for each role.
12. Custom / User Defined Exception with an example and write the steps to create the
user defined exceptions. (Bank account pgm that has user defined exception can be
written from java lab).
13. Explain how an interface extends one or more interfaces with suitable examples
14. Write the use of throw and throws keyword in Java with examples
15. Write the implementation of a queue using exception handling
16. Explain chained exceptions with suitable examples
17. super and this keyword and its uses.
Module 4:
1. Explain Thread Synchronization.
2. Illustrate multithread application with example program.
3. Write a java program where one class is having a synchronized method that is
accessed by two threads and show the output. ( Multiplication table pgm from the
ppt can be written).
4. Java program to implement interthread communication
5. Nested classes in java. Explain them in detail.
6. thread creation mechanism with Examples
7. thread priorities with an example
8. Explain Array of objects in Java. provide an example.
9. Life cycle of a thread
10. write the java programs that uses two ways of thread creation
11. File I/O in Java, and why is it essential in Java programming?
12. java program to read and write text files using FileReader and FileWriter classes?
13. concept of reading and writing files in Java with Examples
14. Explain Object class and its methods.
15. Explain fileinputstream fileoutputstream with an example
16. BufferedStreams in Java with Examples
17. Explain thread synchronization mechanism with an example..
Module 5:
1. LinkedList Class and demonstrate it with an example.
2. List class using a Java program.
3. ArrayList Class and demonstrate it with an example.
4. Queue class and demonstrate it with an example.
5. features of Queue class using a Java program.
6. java program to traverse (or iterate) through the elements of ArrayList using for
loop and for each.
7. Write a java program in which how many ways an ArrayList can be
created(arraylist constructors).
8. Compare list and set interface .
9. java program to sort ArrayList of Strings in descending order
10. Java Program to Reverse a LinkedList and convert it into ArrayList
11. java program to traverse through the elements of ArrayList using an iterator?
12. Write a Java Applet that sets the background color to cyan and foreground color to
red and outputs a string message "A simple Applet”.
13. Explain life cycle of an applet.
14. Design an applet program to display a string.
15. Explain swing components in java.
16. purpose of various collection interfaces.
17. restrictions imposed on Java applets
18. how the applet architecture is different from the console-based programs.

You might also like