How To Exam?

a knowledge trading engine...


Dharmsinh Desai University 2007-3rd Sem M.C.A Computer Aplications Core Java - - Question Paper

Sunday, 20 January 2013 03:35Web


Uni : Dharmsinh Desai University
Faculty : MCA
Sem : 3
Sub : Core Java

DHARMSINH DESAI UNIVERSITY FACULTY OF TECHNOLOGY

k

#


MCA - III CORE JAVA

Date : ( I- *2 1

Time : 10: oo -fcr> Total Marks . Instructions:

60


1.    Figures to the right of the questions indicate maximum marks for that question.

2.    Make suitable assumptions wherever necessary & mention them clearly.

SECTIONS

M A)

(1)

(2)

(3)

(4)

(B)

(1)


Answer the following questions (1 mark each) :

[10)


If you dont initialize value of a field, Boolean fields are initialized to_whereas objects references are

initialized to_.

Which of the following is a correct array declaration?

(a) int m[ ][ ]    (b) int m[3][ ]    (c)intm[][3] (d) All of these

Which of the following is automatically inserted by the compiler?

(a) Default constructor (b) Parameterized constructor (c) Copy Constructor (d) Both (a) & (c)

If B is the base class derived by classes D1 & D2, which of the following type conversion will work?

(a) From B to D1    (b) From D1 to D2 (c) From D1 to B    (d) Both (a) & (c)

Write output of the following code. Justify your answer. (2 marks each) class Check { fe

irittemp;    Check(){ temp-100;}

static void kill(Check obj){ obj=null; } void disp0{ System.out.println(temp);} public static void main(String args[ ))

{

Check c = new Check();    ki 11(c);    c.dispf);

}

}

(2)

(3)


class Test{ static{ System.out.println( Hello World"); new Test5();}

{ System.out.p*intln("HeIlo Earth");} }

class TestString

{

public static void main(String args| ]) {

String s|l * { "ABC", "PQR'\ "XYZ" }; for(String str:s)

str=null;

for(String str:s)

System.outprintln(str); }

}

2.

(A)

(B)


Answer the following questions (5 marks each):

(101


List & explain different thread states. Also discuss thread priorities in brief.

List all basic datatypes in Java along with their size. Why are String objects known as immutable objects?

How StringBuffer objects differ from String objects?


OR

[101


2.

(A)

(B)


Answer the following questions (5 marks each):

What are documentation comments? Explain how a method, a class & a package can be documented. Also, write syntax of javadoc command.

Explain difference between static & non-static data-members & methods. Also discuss method overloading & overriding in brief.

, [101 [101 -


3.

(A)

(B)

3.

(A)

(B)


Do as directed(5 marks ach):

Write a program which is both ~ an applet & application as well.

Write a program that performs cloning of objects using clone() method.

OR

Do as directed(5 marks each):

Write a program in which an applet takes two parameters - x & y coordinates and displays a string at that point in the applet.

Write a program that creates a deadlock between two threads.

SECTION-II

4.    Answer the following questions (1 mark each) :    [10]

(1)    Which of the following is the ultimate base class for all other exception classes?

(a)Throwable (b) Error    (c) Exception (d) None of these

(2)    The_&_methods automatically call the accept() method of FileFilter/FilenameFilter interface.

(3)    Which of the following is base class of JRadioButton & JCheckBox ?

(a) AbstractButton (b) AbstractAction (c) JToggleButton    (d) ButtonGroup

(4)    How do you change the current layout manager for a container?

(a)    Use the setLayout() method

(b)    Once created you cannot change the current layout manager of a component

(c)    Use the setLayoutManager( ) method    (d) Use the updateLayout() method

(5)    Which of the following can be accessed using a JDBC program?

(a) Spreadsheet    (b) Textfile    (c) Remote database (d) AH of these

(6)    Which of the following translates API calls into operations for a specific data-source?

(a) DriverManager (b) Driver (c) Connection (d) All of these

(7)    In case of ServerSocket, the default value of incoming connection queue is......

(a) 10    (b) 20    (c) 50    (d) dependent on Java implementation.

(8)    What information is needed to create a TCP Socket?

(a) The Local Systems IP Address & Port Number (b) the Remote System's IPAddress and Port Number.

(c) Only (a)    (d) Both (a) and (b)

(9)    Whidi of the following keyword prevents writeObject() method from writing them to the stream?

(a) nfi&l    (b) transient (c) protected    (d) synchronized

(10)    Which of the following has not BorderLayout as its default layout?

(a)JPanel (b)JFrame (c)JDialog (d)JApplet

5.    Answer the following questions (5 marks each):

[101

1101


(A)    Discuss methods of JOptionPane class used for displaying different types of dialog box.

(B)    What is an adapter class? Explain its use with a suitable example.

OR

5.    Answer the following questions (5 marks each):

(A)    Discuss constructors and methods of the ServerSocket class with their syntax.

(B)    Explain how JDBC supports execution of a stored procedure with a suitable example.

6.    Do as directed(5 marks each):    [19]

(A)    Write a file copy program that reads a text file character-by-character & copies it into another file.

(B)    Write a program that demonstrates multicasting.

OR

i

6. Do as directed(5 marks each):    [10]

(A)    Write a program that reads a paragraph from the keyboard & writes it into a zip file.

(B)    Write a program that takes tablename as input & checks if the table with given name exists in the database.

V,


%

\

9

4







Attachment:

( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Dharmsinh Desai University 2007-3rd Sem M.C.A Computer Aplications Core Java - - Question Paper