University Of Pune Question Paper
M. C. M. (Semester - III) Examination - 2010
OBJECT ORIENTED CONCEPTS AND BASIC JAVA
(Old 2005 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any four from the remaining.
Q.1) What will be the output ? Justify your answer : [14]
(a) A class contains the following declarations of an instance variable
boolean flags[] = new boolean[100];
The value of flags[0] is
(i) true
(ii) null
(iii) false
(iv) none
(b) Which of the following are valid constructors within a class Test ?
Select correct answers :
(i) test() {}
(ii) Test() {}
(iii) void Test() {}
(iv) private final Test() {}
(v) abstract Test() {}
(vi) Test(Test t) {}
(vii) Test(void) {}
[3877]-31 1 P.T.O.
(c) Which event is generated when the position of a scrollbar is
changed ? Select any one correct answer :
(i) KeyEvent
(ii) MouseEvent
(iii) ItemEvent
(iv) ActionEvent
(v) AdjustmentEvent
(d) When will thread die ? (select correct answer)
(i) execution of run() method ends
(ii) sleep() is called
(iii) wait() is called
(iv) execution of thread’s constructor ends
Q.2) Write an application which will accept a string and a character from
user and will print second occurrence of that character in the string. [14]
Q.3) Write an awt application which will show different colours in the list.
When user will click on ‘select’ button, then set background colour
of the application with the selected colour. [14]
Q.4) Write a threaded applet which will display circle with different colours.
Colour will change after 1 second. Accept radius of the circle as
parameter. [14]
Q.5) Write an application which will accept 5 strings from command line.
If any of the strings is palindrome, then throw ‘GotPalindrom’ user
defined exception. [14]
Q.6) Write an application which will accept a file name from user and print
how many words are present in the file. Do necessary validations. [14]
Q.7) Write short notes : (Any Two) [14]
(a) Thread Life Cycle
(b) Packages
(c) Exception Handling
M. C. M. (Semester - III) Examination - 2010
OBJECT ORIENTED CONCEPTS AND BASIC JAVA
(Old 2005 Pattern)
Time : 3 Hours] [Max. Marks : 70
Instructions :
(1) Question No. 1 is compulsory.
(2) Solve any four from the remaining.
Q.1) What will be the output ? Justify your answer : [14]
(a) A class contains the following declarations of an instance variable
boolean flags[] = new boolean[100];
The value of flags[0] is
(i) true
(ii) null
(iii) false
(iv) none
(b) Which of the following are valid constructors within a class Test ?
Select correct answers :
(i) test() {}
(ii) Test() {}
(iii) void Test() {}
(iv) private final Test() {}
(v) abstract Test() {}
(vi) Test(Test t) {}
(vii) Test(void) {}
[3877]-31 1 P.T.O.
(c) Which event is generated when the position of a scrollbar is
changed ? Select any one correct answer :
(i) KeyEvent
(ii) MouseEvent
(iii) ItemEvent
(iv) ActionEvent
(v) AdjustmentEvent
(d) When will thread die ? (select correct answer)
(i) execution of run() method ends
(ii) sleep() is called
(iii) wait() is called
(iv) execution of thread’s constructor ends
Q.2) Write an application which will accept a string and a character from
user and will print second occurrence of that character in the string. [14]
Q.3) Write an awt application which will show different colours in the list.
When user will click on ‘select’ button, then set background colour
of the application with the selected colour. [14]
Q.4) Write a threaded applet which will display circle with different colours.
Colour will change after 1 second. Accept radius of the circle as
parameter. [14]
Q.5) Write an application which will accept 5 strings from command line.
If any of the strings is palindrome, then throw ‘GotPalindrom’ user
defined exception. [14]
Q.6) Write an application which will accept a file name from user and print
how many words are present in the file. Do necessary validations. [14]
Q.7) Write short notes : (Any Two) [14]
(a) Thread Life Cycle
(b) Packages
(c) Exception Handling
0 comments:
Pen down your valuable important comments below