PTU B.Tech CSE 5th Semester May 2019 70595 PROGRAMMING IN JAVA Question Papers

PTU Punjab Technical University B-Tech May 2019 Question Papers 5th Semester Computer Science Engineering (CSE)

www.FirstRanker.com
www.FirstRanker.com
Roll No.
Total No. of Pages : 02
Total No. of Questions : 09
B.Tech. (IT) (2011 Onwards) (Sem.?5)
PROGRAMMING IN JAVA
Subject Code : BTIT-502
M.Code : 70595
Time : 3 Hrs. Max. Marks : 60
INSTRUCTION TO CANDIDATES :
1.
SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
each.
2.
SECTION-B contains FIVE questions carrying FIVE marks each and students
has to attempt any FOUR questions.
3.
SECTION-C contains T HREE questions carrying T EN marks each and students
has to attempt any T WO questions.

SECTION-A
Q1 Answer briefly :

a) Use of wrapper class.

b) Java tokens.

c) String buffer.

d) Limitations of Java programming language.

e) Layout manager.

f) Socket.
www.FirstRanker.com

g) Difference between throw and throws.

h) This pointer.

i) List the different stages in the life cycles of a thread.

j) What are applets?

1 | M-70595

(S2)-165
www.FirstRanker.com

www.FirstRanker.com
www.FirstRanker.com
SECTION-B
2.
Explain Java garbage collection mechanism.
3.
How packages are created and accessed in Java. Briefly explain the naming convention in
packages?
4.
Explain the steps involved in creating and executing a java program.
5.
Write a Java code that generates custom exception if any value from its command line
arguments is negative.
6.
Explain the life cycle of applet.

SECTION-C
7.
Write a program in Java to find nth prime number where n is any integer and should be
taken as input from the user.
8.
Explain the difference between method overriding and method overloading with the help
of suitable example.
9.
What is multithreading in Java? Explain the inter thread communication with the help of
suitable example.




www.FirstRanker.com




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-70595

(S2)-165
www.FirstRanker.com

This post was last modified on 04 November 2019