Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech III JAVA PROGRAMMING Previous Question Paper (November/December - 2020 - R16)
Answer any five questions
All questions carry equal marks
Main
Differentiate between Procedure Oriented Programming and Object Oriented Programming.
Answer
The primary differences between Procedure Oriented Programming (POP) and Object Oriented Programming (OOP) are as follows:
- Focus: POP focuses on functions or procedures, while OOP focuses on objects that combine data and methods.
- Data Security: In POP, data moves openly around the system from function to function, making it less secure. In OOP, data is hidden and cannot be accessed by external functions, ensuring better security through encapsulation.
- Approach: POP follows a top-down approach, whereas OOP follows a bottom-up approach.
- Modularity: OOP provides better modularity through classes and objects, making it easier to maintain and extend compared to the procedural structure of POP.
- Overloading: OOP supports function and operator overloading, which is not supported in POP.
- Examples: POP includes languages like C, Pascal, and FORTRAN; OOP includes languages like Java, C++, and Python.
Write short notes on type casting.
Answer
Type casting is the process of converting a value from one data type to another. In Java, this is categorized into two types:
- Widening Casting (Implicit): This occurs automatically when converting a smaller numeric type to a larger type (e.g., byte to int, or int to double). Since there is no loss of data, the compiler handles it safely.
- Narrowing Casting (Explicit): This must be done manually by placing the target type in parentheses in front of the value. It is required when converting a larger type to a smaller type (e.g., double to int), which may result in data loss or truncation of fractional parts.
What is the need of abstract class in Java?
Answer
Sign in to view the complete answer paper.
Write a java program for implementing method overriding concept.
Answer
Sign in to view the complete answer paper.
How to implement user defined exceptions in java? Explain with example.
Answer
Sign in to view the complete answer paper.
What is the use of JDBC?
Answer
Sign in to view the complete answer paper.
Describe Driver Manager, SQL query and Order by clause of JDBC.
Answer
Sign in to view the complete answer paper.
What is Listener Interfaces? Illustrate Mouse motion listener interfaces with suitable java program.
Answer
Sign in to view the complete answer paper.
What are the rules of constructor?
Answer
Sign in to view the complete answer paper.
Write a Java Program to generate Fibonacci series using recursive functions.
Answer
Sign in to view the complete answer paper.
What are the advantages of interfaces?
Answer
Sign in to view the complete answer paper.
Write a JAVA program for creating a sub package in JAVA.
Answer
Sign in to view the complete answer paper.
Implement listIterator( ) method with appropriate java program.
Answer
Sign in to view the complete answer paper.
Explain the various binary input/output file operations.
Answer
Sign in to view the complete answer paper.