JNTU

JNTU B.Tech IV Year JAVA PROGRAMMING Previous Question Paper (July/August - 2022 - R18)

B.Tech | IV Year | IV-I | R18 | July/August - 2022

Answer PaperPaper Code: 157EUMaximum Marks: 75Time: 3 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

List and explain java buzzwords.

7 marks

Answer

Java buzzwords represent the core design goals that make the language robust and versatile. The key buzzwords include:

  • Simple: Java is designed to be easy to learn by removing complex features like explicit pointers and operator overloading found in C++.
  • Object-Oriented: Everything in Java is an object, facilitating modularity and code reuse through encapsulation, inheritance, and polymorphism.
  • Platform Independent: Java code is compiled into bytecode, which can run on any device equipped with a Java Virtual Machine (JVM), summarized as 'Write Once, Run Anywhere' (WORA).
  • Secure: Java provides a secure environment by eliminating pointers, enforcing strict type checking, and using a security manager to control access to system resources.
  • Robust: It emphasizes early checking for possible errors, with features like strong memory management and automatic garbage collection.
  • Multithreaded: Java supports concurrent execution, allowing multiple tasks to run simultaneously within a single program.
  • Distributed: Java is designed for the internet, providing extensive libraries for handling TCP/IP protocols and remote method invocation.
b

Explain various parameter passing techniques with example.

8 marks

Answer

Java primarily uses Pass-by-Value for parameter passing. The behavior differs based on the data type:

  • Pass-by-Value (Primitive Types): When a primitive type (int, char, etc.) is passed, a copy of the value is created. Changes made to the parameter inside the method do not affect the original variable.
  • Pass-by-Reference (Objects): When an object is passed, the value of the reference (the memory address) is copied. While the reference itself is passed by value, the method can modify the internal state of the object because both the original and the copy point to the same memory location.

Example:

class Test { void modify(int i, int[] arr) { i = 10; arr[0] = 10; } }

In this example, calling modify(x, array) will leave the original integer x unchanged, but the first element of the array will be updated to 10 because the method operates on the object reference.

215 marks
a

Write a java program to multiply two matrices.

7 marks

Answer

Sign in to view the complete answer paper.

b

Give an example for constructor overloading.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Distinguish between classes and interfaces.

7 marks

Answer

Sign in to view the complete answer paper.

b

What is package? What are its advantages? Give examples.

8 marks

Answer

Sign in to view the complete answer paper.

415 marks
a

What is an interface? Discuss various issues in extending an interface.

7 marks

Answer

Sign in to view the complete answer paper.

b

Discuss various forms of inheritance in Java.

8 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Distinguish between throw and throws keywords for exception handling.

7 marks

Answer

Sign in to view the complete answer paper.

b

Give an overview of string handling functions in Java.

8 marks

Answer

Sign in to view the complete answer paper.

6

How can you create your own exception? Explain with an example.

15 marks

Answer

Sign in to view the complete answer paper.

715 marks
a

Write a program to create student registration form with appropriate fields and components.

7 marks

Answer

Sign in to view the complete answer paper.

b

Give an overview of event handling in Java.

8 marks

Answer

Sign in to view the complete answer paper.

8

What is a thread? How do you assign thread priorities? What is a daemon thread?

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of JAVA PROGRAMMING from JNTU for B.Tech EEE IV Year IV-I, July/August - 2022, R18.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in JAVA PROGRAMMING

Loading Question Papers

Fetching data from database...