This download link is referred from the post: PTU BA Last 10 Years 2011-2021 Previous Question Papers|| Punjab Technical University
Roll No. [ ] Total No. of Pages : 04
Total No. of Questions : 14
--- Content provided by FirstRanker.com ---
MCA (Sem.-5)
INTERNET PROGRAMMING AND JAVA
Subject Code : MCA-502
Paper ID : A0522
Time : 3 Hrs. Max. Marks : 75
--- Content provided by FirstRanker.com ---
INSTRUCTIONS TO CANDIDATES :
- SECTION-A will be compulsory and have 20 questions of 1 mark each.
- SECTION-B will have 8 short answer type questions of 5 marks each, out of which candidate will have to attempt any 5.
- SECTION-C will have 5 long answer type questions of 10 marks each, out of which candidate will have to attempt any 3.
SECTION-A
--- Content provided by FirstRanker.com ---
1. Multiple Choice Questions :
- Which of the following is not OOPS concept in Java?
a) Inheritance b) Encapsulation
c) Polymorphism d) Compilation - Which component is used to compile, debug and execute java program?
--- Content provided by FirstRanker.com ---
a) JVM b) JDK
c) JIT d) JRE - Which of these is a mechanism for naming and visibility control of a class and its content?
a) Object b) Packages
c) Interfaces d) None of the Mentioned. - The Java ...................... packages contains all the classes and methods required for even handling.
a) java.applet b) java.awt
c) java.event d) java.awt.eve - Which of these methods can be used to output a string in an applet?
a) display() b) print()--- Content provided by FirstRanker.com ---
c) drawString() d) transient() - Which of these keywords must be used to monitor for exceptions?
a) try b) finally
c) throw d) catch - Which of these method is used to implement Runnable interface?
--- Content provided by FirstRanker.com ---
a) stop() b) run()
c) runThread() d) stopThread() - Which of these classes are used by Byte streams for input and output operation?
a) InputStream b) InputOutputStream
c) Reader d) All of the mentioned - Which of the following is advantage of using JDBC connection pool?
a) Slow performance b) Using more memory
c) Using less memory d) Better performance - Which method is used to get three-letter abbreviation for locale's country in servlets?
a) Request.getISO3Country() b) Locale.getIS03 Country()--- Content provided by FirstRanker.com ---
c) Response.getlS03Country() d) Local. retrievelSO03Country()
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
State True or False :
- Java Programming promises programmer - "Write Once, Run Anywhere".
- Method overriding is combination of inheritance and polymorphism.
- Java supports operator overloading.
- An arithmetic operations can also be performed by an Applet.
- A servlet is a Java program that is invoked via HTTP on the Web server.
- A Java class may implement one or more interfaces.
- Servlets execute within the address space of web server and uses the functionality of java class libraries.
- ObjectFilter interface is not a member of java.io.package.
- Session.updateAttribute(String name) is used to get an attribute in a HTTP Session object in servlets.
- In JDBC the java.sql.ResultSet interface represents the result set of a database query.
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
SECTION-B
- Explain JDK, JRE and JVM with a suitable diagram.
- What are different types of access modifiers’ in Java? Discuss the procedure for initializing objects of a class.
- How Java packages differ from Interfaces? Explain it with a suitable example.
- How do we create a Java applet? Discuss its life cycle showing passing parameters to Applets.
- Explain exception and when it is raised in Java? Discuss how does the exceptions are handled in Java?
- Describe Event Handling and explain five widely used Listener Interface to implement this in Java.
- What is Java Swing and describe its working? Justify why Swing components are called lightweight?
- Justify the purpose of different classes and methods used for Java I/O (Input/Output) handling.
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
SECTION-C
- Explain the concept of OOPS in detail and differentiate between Java, C and C++ programming languages.
- Write a Java program to design a front end for a login page using Swing components with the following :
a) Border layout,--- Content provided by FirstRanker.com ---
b) Grid Layout managers : - What is Multithreading and how it is implemented in Java? Explain the stages of a thread life cycle.
- What is JDBC and explain its architecture. Write the purpose of the following JDBC classes : (a) DriverManager, (b) ResultSet, (c) Statement Interface, (d) Connection Interface
- Differentiate the following with suitable examples of each:
a) TCP and UDP Sockets in Java Socket programming.--- Content provided by FirstRanker.com ---
b) doGet and doPost method in Java Servlets.
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.
--- Content provided by FirstRanker.com ---
This download link is referred from the post: PTU BA Last 10 Years 2011-2021 Previous Question Papers|| Punjab Technical University