Exam Details
Subject | java programming | |
Paper | ||
Exam / Course | m.sc. computer science | |
Department | ||
Organization | solapur university | |
Position | ||
Exam Date | April, 2017 | |
City, State | maharashtra, solapur |
Question Paper
M.Sc.(Computer Science) (Semester II)
(CBCS) Examination, 2017
JAVA PROGRAMMING
Day Date: Wednesday, 19-04-2017 Max. Marks: 70
Time: 10:30 AM to 01.00 PM
N.B. Q.1 and Q.2 are compulsory Questions.
Attempt any 3 Questions from Q .No 3 to No.7.
Figures to the Right indicate full marks.
Q.1 Choose the correct alternatives: 10
What does AWT stands for?
All Window Tools All Writing Tools
Abstract Window Toolkit Abstract Writing Toolkit
Which of these is used to perform all input output
operations in java?
Streams Variable Classes methods
Which of these events will be generated if we close an
applet's window?
Action Event Component Event
Adjustment Event Window Event
Which of these methods can be used to output a sting in an
applet?
Display Wait
Draw String Transient
Which two of the following methods are defined in class
Thread?
1. start() 2. wait() 3. notify() 4. 5. terminate()
1 and 4 2 and 3 3 and 4 2 and 4
Which of the following will directly stop the execution of a
Thread?
wait() notify()
notifyall() exits synchronized code
what will be the output of the program?
public class RTExcept
public static void throwit()
System.out.print("throwit");
Throw new RuntimeException();
Page 1 of 4
SLR-RG- 337
public static void main(String args)
try
System.out.print("hello");
throwit();
catch (Exception re)
System.out.print("caught");
finally
System.out.print("finally");
System.out.ptintIn("after");
hello throwit caught
Compilation fails
hello throwit Runtime Exception caught after
hello throwit caught finally after
What will be the output of the program?
public class Test
public static void aMethod throws Exception
Line 5
throw new Exception(); Line 7
finally Line 9
System.out.print("finally"); Line 11
public static void main(String
try
aMethod();
catch (Exception Line
System.out.print("exception");
System.out.print("finished"); Line 24
Page 2 of 4
SLR-RG- 337
Finally Exception finished
Finally exception finished Compilation fails
What will be the output of the program
public class Test
public int aMethod()
static int
return
public static void main (String
Test test new
test.aMethod();
int j test.aMethod();
System.out.printIn(j);
0 1 2 Compliation fails
10) What will be the output of the program?
int i
do
if(i
break;
while
System.out.printIn("i and j
i=6 and j=5 i=5 and j=5
i=6 and j=4 i=5 and j=6
Write whether true or false: 04
In an instance method or a constructor, "this" is a reference
to the current object.
The "switch" selection structure must end with the default
case.
An array in the java programming language has the ability to
store many different types of values.
Assignment operator is evaluated Left to Right.
Q.2. Write short notes on the following. 08
Synchronization
Final variable and method
Page 3 of 4
SLR-RG- 337
Answer the following: 06
State various features of java
Explain with suitable example how to extend exception.
Q.3 Answer the following:
Explain Applet Life cycle with example. 07
Explain String Buffer class and explain any 4 methods of it. 07
Q.4 Answer the following:
Explain how to draw following shape in applet.
1. Rectangle
2. Ellipse
3. Arcs
09
WAP to read number from user and check it is Prime or not.
If given number is negative or zero then throw exception
and massage "Enter number greater than zero".
05
Q.5 Answer the following:
Explain any Window Listener methods with example. 07
What is multithreading? Explain the life cycle of the thread. 07
Q.6 Answer the following:
State the purpose of the following JDBC classes an
interfaces
i. Driver manager
ii. Connection
iii. Statement
iv. Result set
08
What is abstract class? State its properties with example. 06
Q.7 Answer the following:
Explain any Mouse Motion Listener methods with example
and how to check which mouse button is pressed by using
Mouse Event class.
07
Explain the inner class in java with example. 07
(CBCS) Examination, 2017
JAVA PROGRAMMING
Day Date: Wednesday, 19-04-2017 Max. Marks: 70
Time: 10:30 AM to 01.00 PM
N.B. Q.1 and Q.2 are compulsory Questions.
Attempt any 3 Questions from Q .No 3 to No.7.
Figures to the Right indicate full marks.
Q.1 Choose the correct alternatives: 10
What does AWT stands for?
All Window Tools All Writing Tools
Abstract Window Toolkit Abstract Writing Toolkit
Which of these is used to perform all input output
operations in java?
Streams Variable Classes methods
Which of these events will be generated if we close an
applet's window?
Action Event Component Event
Adjustment Event Window Event
Which of these methods can be used to output a sting in an
applet?
Display Wait
Draw String Transient
Which two of the following methods are defined in class
Thread?
1. start() 2. wait() 3. notify() 4. 5. terminate()
1 and 4 2 and 3 3 and 4 2 and 4
Which of the following will directly stop the execution of a
Thread?
wait() notify()
notifyall() exits synchronized code
what will be the output of the program?
public class RTExcept
public static void throwit()
System.out.print("throwit");
Throw new RuntimeException();
Page 1 of 4
SLR-RG- 337
public static void main(String args)
try
System.out.print("hello");
throwit();
catch (Exception re)
System.out.print("caught");
finally
System.out.print("finally");
System.out.ptintIn("after");
hello throwit caught
Compilation fails
hello throwit Runtime Exception caught after
hello throwit caught finally after
What will be the output of the program?
public class Test
public static void aMethod throws Exception
Line 5
throw new Exception(); Line 7
finally Line 9
System.out.print("finally"); Line 11
public static void main(String
try
aMethod();
catch (Exception Line
System.out.print("exception");
System.out.print("finished"); Line 24
Page 2 of 4
SLR-RG- 337
Finally Exception finished
Finally exception finished Compilation fails
What will be the output of the program
public class Test
public int aMethod()
static int
return
public static void main (String
Test test new
test.aMethod();
int j test.aMethod();
System.out.printIn(j);
0 1 2 Compliation fails
10) What will be the output of the program?
int i
do
if(i
break;
while
System.out.printIn("i and j
i=6 and j=5 i=5 and j=5
i=6 and j=4 i=5 and j=6
Write whether true or false: 04
In an instance method or a constructor, "this" is a reference
to the current object.
The "switch" selection structure must end with the default
case.
An array in the java programming language has the ability to
store many different types of values.
Assignment operator is evaluated Left to Right.
Q.2. Write short notes on the following. 08
Synchronization
Final variable and method
Page 3 of 4
SLR-RG- 337
Answer the following: 06
State various features of java
Explain with suitable example how to extend exception.
Q.3 Answer the following:
Explain Applet Life cycle with example. 07
Explain String Buffer class and explain any 4 methods of it. 07
Q.4 Answer the following:
Explain how to draw following shape in applet.
1. Rectangle
2. Ellipse
3. Arcs
09
WAP to read number from user and check it is Prime or not.
If given number is negative or zero then throw exception
and massage "Enter number greater than zero".
05
Q.5 Answer the following:
Explain any Window Listener methods with example. 07
What is multithreading? Explain the life cycle of the thread. 07
Q.6 Answer the following:
State the purpose of the following JDBC classes an
interfaces
i. Driver manager
ii. Connection
iii. Statement
iv. Result set
08
What is abstract class? State its properties with example. 06
Q.7 Answer the following:
Explain any Mouse Motion Listener methods with example
and how to check which mouse button is pressed by using
Mouse Event class.
07
Explain the inner class in java with example. 07
Other Question Papers
Subjects
- .net technology
- artifical intelligence
- computer communication network
- data mining and warehouse
- data structures
- dbms
- digital image processing
- distributed operating system
- finite automata
- internet of things
- java programming
- linux operating system (oet)
- mobile computing
- network security
- numerical analysis
- object oriented programming using c++
- office automation (oet)
- operating system
- operations research
- soft computing
- software engineering
- software testing
- uml