Exam Details

Subject java programming
Paper
Exam / Course m.sc. computer science
Department
Organization solapur university
Position
Exam Date November, 2016
City, State maharashtra, solapur


Question Paper

Master of Science I (Computer Science) Examination:
Oct Nov 2016 Semester II (New CBCS)
SLR No. Day
Date Time Subject Name Paper
No. Seat No.
SLR SC
308
Thursday
17/11/2016
10:30 AM
to
01:00 PM
Java Programming
C
V
Instructions: Q.No.1 and 2 are compulsory.
Answer any three questions from Q.No.3 to Q.No.7.
All questions carry equal marks.
Marks: 70
Q.1 Choose correct alternatives. 10
Select correct alternatives:
Which is a reserved word in the Java programming language?
method native
subclasses reference
Which is a valid declarations of a String?
String s1 null; String s2
String s3 (String) String s4 (String)
What is the most restrictive access modifier that will allow members of one
class to have access to members of another class in the same packages?
public abstract
protected default access
Which cause a compiler error?
int
int[ scores
String cats {"Fluffy", "Spot", "Zeus"}
Boolean results new Boolean {true, false, true};
Which of the following is/are legal method declarations?
1. protected abstract void
2. static final void
3. synchronized public final void
4. private native void
1 and 3 2 and 4
1 only All of them are legal declarations
Which three are valid method signatures in an interface?
1. private int get area
2. public float getVol(float
3. public void main (String args);
4. public static void main(String args);
5. boolean setFlag (Boolean test);
1 and 2 3 and 5
4 and 5 2 and 4
Page 2 of 3
What will be the output of the program?
Public class X

Public static void main (String args)

try

bad Method
System.out. print

Catch (Exception ex)

System. Out. Print

finally

System.out.print

System.out.print

public static void bad Method

throw new Error


ABCD
Compilation fails
BC is printed before exiting with an error message.
C is printed before exiting with an error message.
Which two are valid constructors for Thread?
1. Thread (Runnable String name)
2. Thread
3. Thread (int priority)
4. Thread (Runnable Thread Group
5. Thread (Runnable int priority)
1 and 3 2 and 4
1 and 2 2 and 5
Which three are methods of the Object class?
1. notify
2. notify all
3. islnterrupted
4. synchronized
5. interrupt
6. wait (long msecs);
7. sleep (long msecs);
8. yield(
4 5
6 4
Page 3 of 3
10) Which of these events will be notified if scroll bar is manipulated?
ActionEvent ComponentEvent
AdjustmentEvent WindowEvent
State True or false: 04
Can we compare int variable with a Boolean variable?
The method to Lower Case changes all lowercase letters to uppercase and
all uppercase letters to lowercase.
The method indexOf will allow you to search for the location of a
comma.
All variables must be declared before they can be used.
Q.2 Write short notes on the following: 08
Method Overriding
ii) Thread Priority
ii)
Answer the following: 06
Explain with suitable example, how to use a try- catch block, Explain with
example.
ii) Explain steps in creation and implementation of package with example.
Q.3 Answer the following: 14
Explain inter-thread communication with example.
WAP to read number from user and check it is Prime or not. If given number is
negative or zero then throw exception and give message "Enter number greater
than zero".
Q.4 Answer the following:
Explain how to draw following shape in applet
1. Ellipse
2. Arcs
3. Polygon
09
Explain Applet life cycle with example. 05
Q.5 Answer the following:
Explain with suitable example how to extends exception. 07
State the features of Gride Layout and explain how to implement it. 07
Q.6 Answer the following:
State the purpose of the following JDBC classes an interfaces.
Driver manager
ii) Connection
iii) Statement
iv) Result set
08
State the feature of Flow layout and explain how to implement it. 06
Q.7 Answer the following:
Explain any MouseMotionsListener methods with example and how to check
which mouse button is pressed by using MouseEvent class.
07
What is difference between String and String buffer and explain 3 methods of
String and String buffer class with example.


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