0% found this document useful (0 votes)
13 views

Java Programming Paper

The document contains 9 multiple choice questions about Java programming concepts such as keywords, data types, object-oriented programming principles like inheritance and polymorphism, exception handling, threads and applets. It asks about the memory size of the int data type, final keywords, default packages, exceptions from divide by zero, superclass of exception classes, and methods for starting threads and the lifecycle of applets. Students are instructed to write out full answers instead of letter choices for the multiple choice questions.

Uploaded by

mixipe3375
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Java Programming Paper

The document contains 9 multiple choice questions about Java programming concepts such as keywords, data types, object-oriented programming principles like inheritance and polymorphism, exception handling, threads and applets. It asks about the memory size of the int data type, final keywords, default packages, exceptions from divide by zero, superclass of exception classes, and methods for starting threads and the lifecycle of applets. Students are instructed to write out full answers instead of letter choices for the multiple choice questions.

Uploaded by

mixipe3375
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

oral No. of Questions: 6 Total No.

of Printed Pages:2
Enrollment No... **°**9**°*°*e****°*e9eo*****
Total No. of Questions: 6 Total No. of Printed Pages:2
Faculty of Engineering
End Sem (Makeup) Examination Aug-2018 Enrollment No...
CS2ES08 Java Programming
UNIVERST
Knowiedgeh Power
Programme: Diploma Branch/Specialisation: CS Faculty of Engineerings
End Sem (Even) Examination May-2018
uration: 3Hrs Maximum Marks: 60
UNIVER CS2ES08 Java Programming
Dte: All questions are compulsory. Internal choices, if any, are indicated. Answers of Knowledge is Power
Programme: Diploma Branch/Specialisation: CSE
1 (MCQs) should be written in full instead of only a, b, c or d.
Duration: 3 Hrs. Maximum Marks: 60
i. Which of the following is not a keyword in java?
(a) static (b) void (c) boolean (d) private Note: All questions are compulsory. Internal choices, if any, are indicated. Answers of
ii. f character constant is used for Q.1 (MCQs) should be written in full instead of only a, b, c or d.
(a) Form feed (b) Fault recovery Q.1 i. Which is a valid keyword in java? 1
(c) Formal comment (d) Back space (a) Interface (b) String (c)Float (d) Unsigned
iii. Method overloading is an example of: 1 1
11. What is the memory size of data type "int" in Java?
(a) Static Binding (b) Dynamic Binding (a) 8 bit b) 16 bit ) 32 bit (d) 64 bit
(c) Both (a) and (b) (d) None of these Which is false statement?
ii.
iv. Which of these methods of string class is used to obtain character at 1
(a) Final class cannot be inherited
specified index?
(b) Final method can be inherited
(a) Char) (b) Charat(0 (c) charAt) (d) charat)0
(c) Final method cannot be overridden
V. A class member declared protected becomes a member of sub class of 1 (d) Final variable of a class cannot be changed.
which type? in Java? 1
iv. Which of the following class is a super class of every class
(a) Public member (b) Protected member (c) Thread (d) Object
(a) Abstract (b) String
(c) Private member (d) Static member with interface?
V. Which of the following access specifier can be used
Which of the following is correct way to import all classes of package 1
vi.
(a) Public b) Private (c) Protected (d) None of these
in java? 1
vi. Default package of Java is:
(a) Import pkg (b) Import pkg.* (b) java.lang (c)java.io (d) java.net
(a) java.util 1
(c)Import pkg.* (d) import Pkg.*
If you try to divide by zero, which of the following exception will
vii.
vii. Which requires less resource?
occur?
(a) Threads (b) Threads and process (b) NumberFormatException
(a) ArithmeticException
(c)Process (d) None
(c) NullPointerException (d) None of these.
vii. Which of hese is super class of all excepti typeclasses? 1 execution?
to start a thread
(b) Throwable vii. Method which is used
(a) String ()run) (d) resume0
(c)RuntimeExceptions (d) Cachable (a) init() (b) start()
Which method is
called first by an applet?
ix. What does AWT stands for? ix.
(c) init() (d) paint()
(a) start() (b) run() P.T.O.
(a) All Window Tools (b) All Writing Tools
(c) Abstract Window Toolkit (d) Abstract Writing Toolkit
P.T.O.
[21
. Which of this class is used to read characters in a file? [21
(a) FileReader (b) FileWriter 1
X. Which package contains color class?
(c) FilelnputStream (c) InputStreamReader
(a) java.applet (b) java.awt (java.graphics (d) java.lang
.2 i. Why java is platform independent language? Q.2 i. Why is Java known as platform independent language?
ii. How is java different from C++? 3
ii. Write a program to find greater number among three numbers using 3
ii. What are operators? Explain different categories of operators in java. 5
nested if.
R iv. What are the decision making statements in java? Explain in details 5
ii. Explain any five features of Java Programming Language in detail.
with proper syntax and examples. OR iv. Write difference between Object Oriented Programming and 5
Procedural Programming.
3 i. Define constructor?
11. What is inheritance? Explain its different forms with diagrams and 8
What do you understand by constructor? Explain with example.
Q.3 i.
example. Writea 8
ii. What do you mean by Abstract Method and Abstract Class?
ii1. What are visibility modifiers in java? Explain its types with examples method.
program to create abstract class and
OR ii. Explain Method Overiding with suitable example.
i. Define:
(a) Interface (b) Package Q4 i. What is an interface? How it differs from Abstract Class?
How packages are created, imported and used? Discuss with the help 1 how to 7
11.
ii. What do you mean by Multiple Inheritance? Explain
of example. Also discuss package access protection. Interface.
implement Multiple Inheritance using an
111. How interface is different froma class? Also explain how interfaces and add a class to it? 7
OR ii. Define Package? How to create a package
are implemented in java. Write a program to create interface.
Explain with the help of a Java Program.
and blocking of threads in java? Mention the 4
i. What are stopping What is a Thread? Explain its life cycle with diagram.
Q.5 i.
methods. Runnable 6
a thread by implementing
in ii. Illustrate how to create
ii. What is exceptional handling? How multiple exceptions are caught
interface. 6
a single program? using try, catch
What is an Exception? Explain Exception Handling
ii. Explain Multithreading. How java implements its thread model1? OR ii.
and throw with syntax.
Attempt any two:
What is an Applet? How Applets are different from stand alone java Attempt any two:
.
Q.6 its life cycle with suitable diagram.
application? Write a program to create an applet. What is an Applet? Explain circle.
1 draw a
class in Java. Discuss drawing methods of graphics 5 with Applet code to
. Explain Graphics Write a Java Program
Write a procedure to add
class in java. from Application?
ii. How Applet differs
ii1. What areStream classes in Java? Explain byte stream and Character HTML file.
applet in
stream in Detail.
******
******

You might also like