0% found this document useful (0 votes)
49 views10 pages

Cs25c09-Java Programming Question Bank

The document is a comprehensive question bank for a Java programming course, covering various topics including Object-Oriented Programming, Java core libraries, I/O and GUI programming, and database connectivity using JDBC. It is divided into units with Part A and Part B questions that range from definitions and principles to detailed explanations and comparisons of Java concepts. The document serves as a study guide for students to prepare for examinations and understand key Java programming concepts.

Uploaded by

gowrisincet
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)
49 views10 pages

Cs25c09-Java Programming Question Bank

The document is a comprehensive question bank for a Java programming course, covering various topics including Object-Oriented Programming, Java core libraries, I/O and GUI programming, and database connectivity using JDBC. It is divided into units with Part A and Part B questions that range from definitions and principles to detailed explanations and comparisons of Java concepts. The document serves as a study guide for students to prepare for examinations and understand key Java programming concepts.

Uploaded by

gowrisincet
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

CS25C09-Java Programming Question Bank

Unit I: Foundations of OOP and Java


Part - A

1. What is Object-Oriented Programming (OOP)?


2. List the four main principles of OOP.
3. What is the difference between a class and an object?
4. What is encapsulation?
5. Define inheritance.
6. What is polymorphism?
7. What is abstraction?
8. What is the Java Development Kit (JDK)?
9. Differentiate between JDK, JRE, and JVM.
10. What are primitive data types in Java?
11. What is a variable?
12. What are the different types of variables in Java?
13. What is an array?
14. How do you declare and initialize an array in Java?
15. What is the purpose of operators in Java?
16. List the different categories of operators.
17. What is the difference between == and equals()?
18. What are control statements?
19. What are the different looping statements in Java?
20. What is the purpose of the break and continue statements?
21. What is a constructor?
22. State the characteristics of a constructor.
23. What is constructor overloading?
24. What is method overriding?
25. What are access specifiers in Java?
26. Differentiate between public, private, protected, and default access.
27. What is a static member?
28. What is the use of the static keyword?
29. What is inheritance in Java?
30. List the types of inheritance supported in Java.
Part- B

1. Explain the principles of Object-Oriented Programming with


examples.
2. Compare JDK, JRE, and JVM.
3. Explain primitive and non-primitive data types in Java.
4. Describe different types of variables with suitable examples.
5. Explain one-dimensional and two-dimensional arrays.
6. Discuss arithmetic, relational, logical, and assignment operators.
7. Explain decision-making statements (if, if-else, and switch) with
examples.
8. Describe looping statements (for, while, and do-while) with examples.
9. Explain the concept of classes and objects with a Java program.
10. Explain constructors and their types.
11. Differentiate constructor overloading and method overloading.
12. Explain method overriding with an example.
13. Describe access specifiers and their scope.
14. Explain static variables, static methods, and static blocks.
15. Explain inheritance and its benefits.
Unit II: Java Conceptual Foundations and Capabilities

Part - A

1. What is a package in Java?


2. What are the advantages of using packages?
3. Differentiate between built-in packages and user-defined packages.
4. What is an interface?
5. State the features of an interface.
6. Differentiate between a class and an interface.
7. What is the purpose of the implements keyword?
8. What is exception handling?
9. What is an exception in Java?
10. Differentiate between checked and unchecked exceptions.
11. What are the keywords used in exception handling?
12. What is the purpose of the finally block?
13. What is multithreading?
14. What is a thread?
15. Differentiate between a process and a thread.
16. What are the different ways to create a thread in Java?
17. What is thread synchronization?
18. What is an enumeration (enum)?
19. What are the advantages of using enums?
20. What is autoboxing?
21. What is unboxing?
22. What is an annotation in Java?
23. Name any four built-in annotations in Java.
24. What are generics?
25. What are the advantages of generics?
26. What is a lambda expression?
27. State the syntax of a lambda expression.
28. What are functional interfaces?
29. What is the purpose of the @Override annotation?
30. Differentiate between lambda expressions and anonymous classes.
Part- B

1. Explain packages in Java and describe the procedure for creating and
importing user-defined packages with suitable programs.
2. Discuss interfaces in detail and explain how multiple inheritance is
achieved using interfaces.
3. Explain Java exception handling mechanisms with suitable examples.
4. Describe multithreaded programming in Java. Explain thread creation,
thread life cycle, and synchronization with examples.
5. Explain enumerations, autoboxing, and annotations with suitable
examples.
6. Discuss generics in Java and explain generic classes, generic methods,
and bounded types with examples.
7. Explain lambda expressions and functional interfaces with appropriate
Java programs.
8. Compare interfaces, abstract classes, and concrete classes with
examples.
9. Explain different types of exceptions and demonstrate exception
handling using Java programs.
10. Describe thread synchronization and inter-thread communication with
suitable examples.
Unit III: Java Core Libraries

Part - A

1. What is a string in Java?


2. Differentiate between String, StringBuffer, and StringBuilder.
3. What is string immutability?
4. List any four commonly used methods of the String class.
5. What is the purpose of the StringBuffer class?
6. What is the difference between StringBuffer and StringBuilder?
7. What is the [Link] package?
8. Name any four important classes available in the [Link] package.
9. What is the purpose of the Math class?
10. What is the use of the System class?
11. What are utility classes in Java?
12. What is the purpose of the [Link] package?
13. What is the [Link] package?
14. Differentiate between byte streams and character streams.
15. What is file handling in Java?
16. Name any four classes available in the [Link] package.
17. What is event handling in Java?
18. What is an event?
19. What is an event listener?
20. What is an event source?
21. What are AWT controls?
22. List any four commonly used AWT controls.
23. What is a layout manager?
24. Name the different types of layout managers in Java.
25. What is FlowLayout?
26. What is BorderLayout?
27. What is GridLayout?
28. What is CardLayout?
29. What is the purpose of ActionListener?
30. Differentiate between AWT and Swing.
Part - B

1. Explain string handling in Java. Compare String, StringBuffer, and


StringBuilder with suitable programs.
2. Discuss the [Link] package and explain the functions of important
classes with examples.
3. Explain the [Link] package. Describe file input and output operations
using suitable Java programs.
4. Explain Java event handling and the event delegation model with
examples.
5. Discuss AWT controls and explain their usage with suitable Java
programs.
6. Explain different layout managers in Java with neat diagrams and
examples.
7. Compare different layout managers and discuss their advantages and
disadvantages.
8. Explain the working of event listeners and event adapters with suitable
examples.
9. Discuss utility classes in Java and explain their applications with
examples.
10. Explain GUI programming using AWT controls and layout managers
with sample programs.
Unit IV: I/O and GUI Programming in Java

Part - A

1. What is Console I/O in Java?


2. What are the different ways to read input from the console?
3. What is the purpose of the Scanner class?
4. What is the purpose of the BufferedReader class?
5. Differentiate between Scanner and BufferedReader.
6. What is file handling in Java?
7. What is a file stream?
8. Differentiate between text files and binary files.
9. Name any four classes available in the [Link] package for file
handling.
10. What is the purpose of the File class?
11. What is Swing in Java?
12. Differentiate between AWT and Swing.
13. What are the advantages of Swing?
14. Name any four Swing components.
15. What is JFrame?
16. What is JPanel?
17. What is JLabel?
18. What is JButton?
19. What is JTextField?
20. What is a menu in Java Swing?
21. What is the purpose of JMenuBar?
22. What is JMenu?
23. What is JMenuItem?
24. What is the use of separators in menus?
25. What is an event listener in Swing?
26. What is ActionListener?
27. What is the difference between AWT and Swing components?
28. What is the purpose of JOptionPane?
29. What is a dialog box in Swing?
30. Name any four commonly used Swing containers
Part - B

1. Explain different methods of reading and writing Console I/O in Java


with suitable examples.
2. Discuss file handling in Java. Explain file creation, reading, writing,
and appending with suitable Java programs.
3. Explain the architecture and features of Swing. Compare Swing with
AWT.
4. Describe important Swing components such as JFrame, JPanel,
JButton, JLabel, JTextField, and JTextArea with examples.
5. Explain menu creation in Swing using JMenuBar, JMenu, and
JMenuItem with suitable programs.
6. Discuss event handling in Swing applications with examples.
7. Explain dialog boxes in Swing using JOptionPane with suitable
examples.
8. Develop a GUI application using Swing components and menus.
9. Explain file input and output operations using character and byte
streams with examples.
10. Compare Console I/O and file I/O in Java with suitable examples.
Unit V: Database Connectivity Using Java and Java Collection Frame
Work

Part - A
1. What is JDBC?
2. Expand JDBC.
3. What are the advantages of JDBC?
4. List the different types of JDBC drivers.
5. Differentiate between Type 1 and Type 4 JDBC drivers.
6. What is the JDBC API?
7. Name any four packages available in JDBC.
8. What is the purpose of the DriverManager class?
9. What is a JDBC driver?
10. What is a database connection?
11. What is the JDBC-ODBC Bridge driver?
12. What are the steps involved in establishing a JDBC connection?
13. What is the purpose of the Connection interface?
14. What is the use of the Statement interface?
15. Differentiate between Statement, PreparedStatement, and
CallableStatement.
16. What is the purpose of the ResultSet interface?
17. What are CRUD operations in JDBC?
18. What is the Collection Framework?
19. What are the advantages of the Collection Framework?
20. Differentiate between List, Set, and Map.
21. What is the [Link] package?
22. What are arrays and collections?
23. What is an iterator?
24. What is the purpose of the Iterator interface?
25. What is the Map interface?
26. Differentiate between HashMap and TreeMap.
27. What is a regular expression (Regex)?
28. What is the purpose of the Pattern and Matcher classes?
29. What are generics?
30. What are the advantages of generics in collections?
Part -B

1. Explain JDBC architecture and discuss the different types of JDBC


drivers with suitable diagrams.
2. Describe the JDBC API and explain the procedure for connecting a
Java application to a database with an example.
3. Explain database connectivity using JDBC. Discuss CRUD operations
with suitable Java programs.
4. Explain the Collection Framework in Java and describe its hierarchy
with examples.
5. Discuss the List, Set, and Map interfaces and compare their
implementations.
6. Explain the [Link] package and its important classes with suitable
examples.
7. Explain arrays and collections in Java. Compare their advantages and
limitations.
8. Discuss regular expressions (Regex) and explain pattern matching
using the Pattern and Matcher classes with examples.
9. Explain iterators and their role in traversing collections with suitable
Java programs.
10. Discuss generics in Java and explain their applications in the
Collection Framework with examples.

You might also like