Q.1) Attempt any FIVE of the following.
a) Give
syntax and example of following math functions.
i)
sqrt ()
ii)
pow ()
b) Enlist
access specifiers in Java.
c) Name
the methods from wrapper class for following task
i)
To convert string objects to primitive int. ii) To convert integer object to
string object.
d) State
the use of static keyword
e)
Enlist any 4 keywords used for exception
handling in Java.
f) Give
syntax of <param> tag to pass parameters to an Applet.
g)
Give any two methods from File class with
their usage.
|
10
Marks
|
|
Q.2) Attempt any
THREE of the following.
|
12 Marks
|
a) Write
a program to find largest between two numbers using ‘?:’ operator.
b) Define
class Student with suitable data members create two objects using two different
constructors of the class.
c) Describe
life cycle of thread with suitable diagram.
d) Write
a program to copy content of one file into another file.
Q.3) Attempt any THREE of the
following.
12
Marks
a) Write
a program to divide any positive even integer by 2 using bitwise shift
operator.
b) State
need of interface with suitable examples.
c) Give
usage of following methods :
i)
drawOval()
ii)
getFont()
iii)
drawArc()
iv)
getFamily()
d) Enlist types of stream classes and
describe methods for reading and writing data for each type.
Q.4) Attempt any THREE of the
following.
12
Marks
a) Describe
types of variables in Java with their scope.
b) Write
a program to initialize object of a class student using parameterized
constructor.
c) Write
a program to create package Math_s
having two classes as addition and subtraction. Use suitable methods in each
class to perform basic operations.
d) Differentiate
between Java Application and Java Applet (any 4 points)
e) Write
a program to count number of words from a text file using stream classes.
Q.5) Attempt any TWO of the following. 12
Marks
a) Write
a step to declare and define two and three dimensional arrays of a class.
b) Implement
following inheritance:
Display details of devices from loadOS() method of class
Mobile.
c) Write
a program to define two threads for displaying even and odd numbers
respectively with a delay of 500 ms after each number.
Q.6) Attempt any TWO of the following. 12
Marks
a) Write
a program to define class Employee with members as id and salary. Accept data
for five employees and display details of employees getting highest
salary.
b) Describe
types of Errors and Exceptions in details.
c) Design
an Applet to pass username and password as parameters and check if password
contains more than 8 characters.
Comments
Post a Comment
If you have any query, please let us know