0% found this document useful (0 votes)
4 views3 pages

Java Sem Imp Questions

The document outlines key concepts of Object-Oriented Programming in Java, covering topics such as class structure, data types, control statements, and exception handling. It also discusses advanced topics like inheritance, multithreading, and Java FX GUI development. Each unit includes explanations, examples, and programming tasks to illustrate the concepts.

Uploaded by

naveen.cr.csm
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)
4 views3 pages

Java Sem Imp Questions

The document outlines key concepts of Object-Oriented Programming in Java, covering topics such as class structure, data types, control statements, and exception handling. It also discusses advanced topics like inheritance, multithreading, and Java FX GUI development. Each unit includes explanations, examples, and programming tasks to illustrate the concepts.

Uploaded by

naveen.cr.csm
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

UNIT-I: Object-Oriented Programming

1. Explain the basic concepts and principles of Object-Oriented Programming.

2. Describe the structure of a Java program. How do you write a simple Java program?

3. What are the different elements or tokens in Java? Provide examples.

4. Explain Java statements with examples.

5. How do you handle command-line arguments in Java?

6. Describe the various escape sequences in Java with examples.

7. Explain Java data types. How do you declare variables in Java?

8. What is type casting in Java? Explain with examples.

9. Discuss the scope of variables and symbolic constants in Java.

10. What are static variables and methods in Java? How are they different from regular variables and
methods?

11. Explain the precedence and associativity of operators in Java with examples.

12. Differentiate between if, if-else, and nested if expressions.

13. Describe the switch statement with an example program.

14. Explain the different iteration statements in Java (while, do-while, for, for-each).

15. Write a program to demonstrate the use of the break and continue statements.

UNIT-II: Classes, Objects, and Java I/O


1. Explain the declaration and modifiers of a class in Java.

2. How do you create and use class objects? Provide examples.

3. What is the purpose of constructors in Java? Explain overloaded constructors.

4. Differentiate between passing arguments by value and by reference with examples.

5. Discuss access control for class members and accessing private members of a class.

6. What are nested classes in Java? Provide use cases.

7. Explain the concept of method overloading and overriding with examples.

8. How do recursive methods work in Java? Provide an example program.

9. Discuss the Java I/O API. What are standard I/O streams?

10. Differentiate between byte streams and character streams in Java.

11. Explain the Scanner class and its use in reading input

12. How are files handled in Java? Write a simple file-handling program
UNIT-III: Arrays and Inheritance
1. Explain the declaration and initialization of arrays in Java with examples.

2. How is an array stored in computer memory?

3. Describe dynamic resizing of arrays in Java.

4. Write a program to sort an array in Java.

5. Differentiate between two-dimensional and three-dimensional arrays.

6. What is inheritance in Java? Explain its types.

7. Discuss the use of the final keyword in inheritance.

8. Explain the concept of multilevel inheritance with an example.

9. How does method overriding work in the context of inheritance?

10. What are abstract classes, and how are they different from interfaces?

11. How are interfaces declared and implemented in Java?

12. What are default and static methods in interfaces?

UNIT-IV: Packages, Exception Handling,


and Strings
1. How do you define and import packages in Java? Provide examples.

2. Explain the purpose of the [Link] package.

3. Discuss the role of wrapper classes and auto-boxing/unboxing in Java.

4. Explain the hierarchy of standard exception classes in Java.

5. What is the difference between checked and unchecked exceptions?

6. How do you use the try, catch, and finally blocks? Provide an example.

7. Write a program to demonstrate multiple catch clauses.

8. Discuss the methods available for handling strings in Java.

9. What are the differences between String, StringBuffer, and StringBuilder?


UNIT-V: Multithreading and Java FX GUI
1. Why is multithreading needed? Explain its advantages.

2. Describe the life cycle of a thread in Java.

3. How do you create and manage threads in Java? Provide examples.

4. Discuss thread synchronization and its importance in multithreading.

5. Explain inter-thread communication with examples of wait(), notify(), and notifyAll().

6. What is a race condition, and how is it avoided in Java?

7. Explain the basic structure of a Java FX app window.

8. How do you handle events in Java FX? Provide examples.

9. Discuss the process of laying out nodes in a scene graph in Java FX.

10. Write a program to display text and images in a Java FX application.9. What are the differences
between String, StringBuffer, and StringBuilder?

You might also like