BEU PYQ Solution Introduction to JAVA Programming

BEU previous question solution. Introduction to java programming 2022 question paper solution. Bihar Engineering University computer science engineering previous year question.

(a) What is truncation in Java?

(i) Floating-point value assigned to an integer type
(ii) Integer value assigned to floating type
(iii) Floating-point value assigned to a floating type
(iv) Integer value assigned to integer type

(b) Which of these is an incorrect array declaration?

(i) int arr[] = new int[5]
(ii) int[] arr = new int[5]
(iii) int arr[]= int[5] new
(iv) None of the above

(c) What is true about a break?

(i) Break stops the execution of entire program
(ii) Break halts the execution and forces the control out of the loop
(iii) Break forces the control out of the loop and starts the execution of next iteration
(iv) Break halts the execution of the loop for certain time frame

(d) When method overloading is deter- mined?

(i) At run time
(ii) At compile time
(iii) At coding time
(iv) execution time

(e) Which method can be defined only once in a program?

(i) Main method
(ii) Finalize method
(iii) Static method
(iv) Private method

(f) Which of these is used to access a member of class before object of that class is created?

(i) Public
(ii) Private
(iii) Static
(iv) Protected

(g) All classes in Java are inherited from which class?

(i) java.lang.class
(ii) java.class.inherited
(iii) java.class.object
(iv) java.lang.object

(h) Which of these packages contains all the Java’s built in exceptions?

(i) java.io
(ii) java.util
(iii) java.lang
(iv) java.net

(i) Which of the following is a superclass of all exception-type classes?

(i) Catchable
(ii) Run-time exceptions
(iii) String
(iv) Throwable

(j) What should not be done to avoid deadlock?

(i) Avoid using multiple threads
(ii) Avoid hold several locks at once
(iii) Execute foreign code while holding a lock
(iv) Use interruptible locks

2. (a) List some important features of Java programming languages. How does Java provide better application development environment than C++?

(b) Discuss primitive data type supported by Java with example

4. (a) What are different types of inheritance in Java? Also write program to demonstrate multiple inheritance using interfaces.

b) Give the detailed explanation of packages in Java.

5. (a) Explain the concept of streams in Java and discuss the classification of Java stream classes. Also write a program to copy the content of one text file to another.

(b) Write a Java code that generates custom exception if any value from its command line arguments is negative.

6. (a) What is string handling? Write a program to append two strings in Java.

(b) Explain exception handling model using try, catch and finally block. Also write a program using multiple catch blocks and finally block. 6+8-14

7. (a) Write a program in Java to find n th prime number where n is any integer and should be taken as input from the user.

(b) What are wrapper classes? Explain the same with examples.

8. (a) Explain the JDBC connectivity with an example.

(b) Explain the life cycle of an applet. How are applets added to HTML? Discuss with the help of an example.

9. Write short notes on the following:

(a) Polymorphism

(b) Relational operators

(c) Package

(d) Listener methods

CLICK HERE TO JOIN WHATSAPP GROUP

INTRODUCTION TO JAVA BEU 2022 PYQ SOLUTION ==> DOWNLOAD

Introduction to JAVA programming 2022 Question paper==> DOWNLOAD

CSE SOLUTION = Cryptography and Network Security BEU Question paper solution

BEU Question paper compiler design solution 2022

Leave a Comment