[Go to site: main page, start]

0% found this document useful (0 votes)
6 views4 pages

Java SampleTheoryQuestions

The document outlines a comprehensive curriculum for a Java programming course, divided into seven modules covering Object Oriented Programming, Exception Handling, Threads, I/O Streams, Generics, Lambda Expressions, AWT, JavaFX, and Servlets. Each module includes a series of topics and questions designed to explore fundamental concepts, features, and functionalities of Java. The curriculum emphasizes practical understanding through examples and comparisons, ensuring a thorough grasp of Java programming principles.

Uploaded by

snugglebaby65
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)
6 views4 pages

Java SampleTheoryQuestions

The document outlines a comprehensive curriculum for a Java programming course, divided into seven modules covering Object Oriented Programming, Exception Handling, Threads, I/O Streams, Generics, Lambda Expressions, AWT, JavaFX, and Servlets. Each module includes a series of topics and questions designed to explore fundamental concepts, features, and functionalities of Java. The curriculum emphasizes practical understanding through examples and comparisons, ensuring a thorough grasp of Java programming principles.

Uploaded by

snugglebaby65
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

CSI2008- Programming in Java

Module1
1. Discuss about the Object Oriented Programming features.
2. What are Java tokens? List and explain the different types of tokens.
3. How to declare and initialize the one dimensional array and multidimensional array? Give
suitable examples.
4. What are statements in Java? Explain the different types of statements.
5. Explain about different types of control statements.
6. Analyze the role JVM's JIT compiler and explain how it might impact the method’s
performance during execution.
7. Explain the role of Java Virtual Machine in program execution?
8. Describe the internal architecture of the JVM
9. Explain the difference between JVM, JRE, and JDK.
10. Describe the general structure of a Java program with an example.
11. What is the scope of a variable? Explain block scope, method scope, and class scope.
12. Differentiate between a regular and jagged (irregular) multidimensional array.
Module2
1. What is a constructor? How is it different from a method?
2. Explain default constructor and parameterized constructor with examples.
3. What is constructor overloading?
4. Differentiate between method overloading and method overriding.
5. Explain returning objects from methods with an example.
6. How can objects be passed as parameters in Java?
7. What are nested classes? What is the difference between static nested classes and inner
classes?
8. What is the purpose of the static keyword in Java? What are static variables and static
methods?
9. Explain the uses of the final keyword for variables, methods, and classes.
10. What is inheritance? Why is it useful in Java? Explain different types of inheritance
supported by Java.
11. What is the role of the super keyword? How is the superclass constructor invoked using
super()?
12. What is an abstract class? Why is it used? Differentiate between abstract class and
interface.
13. What is an interface in Java? How does it differ from a class?
14. What is a package in Java? Why are packages used? Explain how to create and use a user-
defined package.

Module3
Exception Handling
1. What is an exception? How is it different from an error in Java? Explain the need for
exception handling in Java.
2. What is the difference between checked and unchecked exceptions?.
3. What happens when an exception is not handled?
4. Explain the different kinds of blocks used in Exception Handling.
5. Explain the steps to create a custom exception in Java with an example.
6. What is the purpose of the try and catch block?
7. What is the role of the throw and throws keywords?
8. Explain the order of catch blocks and why it matters. Why must subclasses appear before
superclasses in catch clauses?
Threads
9. What is a thread? How is a thread different from a process?
10. What is multithreading? Explain advantages and disadvantages of multithreading.
11. What are the two ways to create a thread in Java? Explain the differences between
extending Thread and implementing Runnable.
12. What are thread priorities? How does Java assign priorities to threads?
13. What is inter-thread communication? Explain the use of wait(), notify(), and notifyAll()
with an example
14. Explain the different states of a thread in Java.
15. Describe the thread life-cycle with a diagram.

Module4
Exception Handling
1. What are I/O streams in Java? Differentiate between byte streams and character streams.
2. Differentiate between FileReader and FileInputStream. [ Similar type of questions]
3. Explain try-with-resources and its significance in file I/O.

Generics
4. What are generics in Java? Explain the advantages of using generics.
5. What is a generic class? Give the general form. Explain how type parameters are specified
when creating an object.
6. Differentiate between <T> and <T extends Number> with an example.
7. What is a generic method? Explain how type parameters are declared in methods.
8. What is a generic interface? Explain how a class implements a generic interface

Module5
Lambda Expressions
1. What is a lambda expression in Java? Explain the advantages of using lambda expressions.
Write the general syntax of a lambda expression.
2. What is a block lambda expression? How do block lambda expressions differ from simple
lambda expressions?
3. What is a functional interface? Give examples.
4. How can lambda expressions be passed as method arguments?

Strings
5. What is StringBuilder? How is it different from StringBuffer?.
6. Differentiate between StringBuffer, StringBuilder and String.

Module6
AWT
1. What is event handling in Java? Explain the event delegation model used in Java.
2. Explain the roles of event source and event listener.
3. What is the difference between MouseListener and MouseMotionListener?
4. Explain the KeyListener interface and its methods.
5. Explain the three types of key events: KEY_PRESSED, KEY_RELEASED,
KEY_TYPED.
6. How do you determine which key was pressed using KeyEvent methods?
7. How to change the foreground color, background color, font size when the mouse is
moved?
8. Determine the position of mouse whenever it is moved.
JavaFX
9. Life cycle methods of JavaFx
10. Architecture of JavaFX. [ Key Components, Scene Graph]
11. Structure of a JavaFX application
12. Explain the purpose of Media, MediaPlayer, and MediaView.

Module7
Servlet
1. Describe the life cycle of a Servlet with a neat diagram.
2. Differentiate between GenericServlet and HttpServlet.
3. Differentiate between GET and POST requests in Servlets.
4. Explain how JDBC can be integrated with Servlets. List the steps.
5. What is a cookie? Explain how to read and delete cookies in a servlet.
6. What is session tracking? Why is it needed?
7. List any five important classes/interfaces in the [Link] package and explain their
purpose.

You might also like