Download PTU B.Tech 2021 Jan ECE 5th Sem 78761 Java Programming Question Paper

Download PTU (Punjab Technical University) B.Tech (Bachelor of Technology) / BE (Bachelor of Engineering) 2021 January ECE 5th Sem 78761 Java Programming Previous Question Paper

Roll No.
Total No. of Pages : 02
Total No. of Questions : 18
B.Tech. (ECE) (Sem.?5)
JAVA PROGRAMMING
Subject Code : UC-BTEC-901F-18
M.Code : 78761
Time : 3 Hrs. Max. Marks : 60
INST RUCT IONS T O CANDIDAT ES :
1 .
SECT ION-A is COMPULSORY cons is ting of TEN questions carrying TWO marks
each.
2 .
SECT ION-B c ontains F IVE questions c arrying FIVE marks eac h and s tud ents
have to atte mpt any FOUR q ues tions.
3 .
SECT ION-C contains THREE questions carrying T EN marks e ach and s tudents
have to atte mpt any T WO questio ns.
SECTION-A
Write briefly :
1.
What do you understand from `public static void main (String [] args)'?
2.
Differentiate between JVM, JRE and JDK.
3.
What are access modifiers? List various types of access modifiers in Java.
4.
What are wrapper classes in Java?
5.
Why is Java considered portable language?
6.
What is the difference between `StringBuffer' and `StringBuilder'?
7.
How to determine factorial of an integer using Java?
8.
What is Object Oriented Programming approach?
9.
What is lambda expression in Java? Give an example.
10. What are encapsulation and polymorphism in Java?
1 | M - 7 8 7 6 1
( S 2 ) - 8 1 9

SECTION-B
11. What are the advantages and disadvantages of Java over C++?
12. Write a Java program to check if the given number is prime number or not?
13. What is inheritance in Java? Write a program to showcase inheritance.
14. What are different ways of creating objects in Java? Give examples.
15. Write a Java program to swap two numbers without using a third variable?
SECTION-C
16. a) What are data types in Java and their required memory sizes to store values?
b) List various operators in Java and give their precedence order.
17. a) What is function overloading in Java?
b) Why does Java not support (i) multiple inheritances and (ii) pointers?
18. a) What is applet in Java? Discuss it life cycle.
b) What are different steps involved in database connectivity?
NOTE : Disclosure of Identity by writing Mobile No. or Making of passing request on any
page of Answer Sheet will lead to UMC against the Student.
2 | M - 7 8 7 6 1
( S 2 ) - 8 1 9

This post was last modified on 26 June 2021