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

OOP_Preparation_Revision_Topics_and_Questions

The document outlines revision topics and questions for Object-Oriented Programming (OOP) preparation, focusing on Java fundamentals such as syntax, data types, methods, exception handling, and file I/O. Students are instructed to prepare these topics and avoid using AI for answers, as presentations will be conducted to assess their understanding. A total of 47 questions are provided across various categories to aid in their revision.

Uploaded by

hamedmehmoodm
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

OOP_Preparation_Revision_Topics_and_Questions

The document outlines revision topics and questions for Object-Oriented Programming (OOP) preparation, focusing on Java fundamentals such as syntax, data types, methods, exception handling, and file I/O. Students are instructed to prepare these topics and avoid using AI for answers, as presentations will be conducted to assess their understanding. A total of 47 questions are provided across various categories to aid in their revision.

Uploaded by

hamedmehmoodm
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Revision Topics & Questions for OOP

Preparation
Total Marks: 20

Topics to Revise
1. Basic Java Syntax & Program Structure
2. Variables, Data Types & Type Conversion
3. Methods & Functions
4. Arrays & Strings
5. Exception Handling
6. File I/O Basics

Instructions for Students


• Prepare the above topics and the questions given below.
• Avoid using AI for answers. Presentations will be conducted in class to judge your
understanding.
• These topics are essential for understanding Object-Oriented Programming (OOP).

Revision Questions

1. Basic Java Syntax & Program Structure (6 Questions)


1. What is the purpose of the `main` method in Java?
2. What are the different types of errors in Java? Explain with examples.
3. How does the compile-link-run cycle work in Java?
4. What are reserved words in Java? Give five examples.
5. What is the difference between a syntax error and a runtime error?
6. What are comments in Java? Explain different types with examples.

2. Variables, Data Types & Type Conversion (8 Questions)


7. What is a primitive data type? List all eight primitive data types in Java.
8. What is the difference between primitive data types and reference data types?
9. What is type casting? Explain implicit and explicit type casting with examples.
10. Explain the difference between static variables and instance variables.
11. Why is it necessary to initialize local variables before using them?
12. What is the difference between a constant and a variable in Java?
13. What is the significance of the final keyword when declaring variables?
14. What are wrapper classes in Java?

3. Methods & Functions (10 Questions)


15. What is a method in Java? How is it different from a function in C?
16. What is the difference between static and non-static methods?
17. Explain method overloading with an example.
18. What is argument promotion in Java?
19. Explain the difference between pass-by-value and pass-by-reference in Java.
20. How does Java handle return values in functions?
21. What are default parameters in Java? Does Java support them?
22. What is the significance of the void return type?
23. What are scope and lifetime of variables inside a method?
24. What is recursion, and how does it work in Java?

4. Arrays & Strings (10 Questions)


25. How do you declare and initialize an array in Java? Provide an example.
26. What is the difference between a 1D array and a 2D array?
27. What are the advantages of using arrays in Java?
28. How do you pass an array to a method in Java?
29. What are the key differences between Arrays and ArrayLists in Java?
30. What is the significance of the length property in arrays?
31. What is the difference between == and .equals() when comparing strings?
32. How do you extract a substring from a string in Java? Provide an example.
33. Convert the string '1234' to an integer in Java.
34. Convert an integer 5678 into a string in Java.

5. Exception Handling (8 Questions)


35. What is an exception in Java? How is it different from an error?
36. What is the difference between checked and unchecked exceptions?
37. What will happen if an exception is not handled in Java?
38. Explain the purpose of try, catch, finally blocks in exception handling.
39. What is exception propagation? Explain with an example.
40. What is the use of the throw and throws keywords in Java?
41. What is chained exception handling in Java?
42. Why is exception handling important in programming?

6. File I/O Basics (5 Questions)


43. What is the purpose of the File class in Java?
44. What is the difference between absolute path and relative path in file handling?
45. How do you check if a file exists in a given directory using Java?
46. How do you read data from a file using Java?
47. How do you write data to a file in Java?
Final Notes
• These questions are designed to help you strengthen your Java fundamentals before
learning OOP.
• Ensure you practice writing and understanding Java code instead of relying on AI-
generated answers.
• Presentations will be taken in class to assess your understanding.

You might also like