June 2015 - Paper 3

36:  

In Java, when we implement an interface method, it must be declared as :

A.

Private

B.

Protected

C.

Public

D.

Friend

 
 

Option: C

Explanation :

Interfaces are meant to define the public API of a type - and only that, not its implementation. So any method (or static member) you define in an interface is by definition public.

Click on Discuss to view users comments.

Write your comments here:



37:   The Servlet Response interface enables a servlet to formulate a response for a client using the method ___________.
A.

void log(Exception e, String s)

B.

void destroy()

C.

int get ServerPort()

D.

void set ContextType(String type)

 
 

Option: D

Explanation :

Click on Discuss to view users comments.

Write your comments here:



38:  

Which one of the following is correct?

A.

Java applets cannot be written in any programming language

B.

An applet is not a small program

C.

An applet can be run on its own

D.

Applets are embedded in another applications

 
 

Option: D

Explanation :

Java Applets can be written is many programming languages.
An applet is a small program.
An applet need to be run in either appletviewer or some JVM.
Applets can be embedded in another applications.

Click on Discuss to view users comments.

Write your comments here:



39:  

In XML we can specify the frequency of an element by using the symbols :

A.

+ * !

B.

# *!

C.

+ * ?

D.

— B ?

 
 

Option: C

Explanation :

The number of occurrences, or the frequency, of an element can be specified by using the plus(+), asterisk(*) or question mark(?) characters.

Click on Discuss to view users comments.

Write your comments here:



40:  

In XML, DOCTYPE declaration specifies to include a reference to ___________ file.

A.

Document type Definition

B.

Document type declaration

C.

Document transfer definition

D.

Document type language

 
 

Option: A

Explanation :

The document type (DOCTYPE) declaration consists of an internal, or references an external Document Type Definition (DTD). It can also have a combination of both internal and external DTDs. The DTD defines the constraints on the structure of an XML document. It declares all of the document's element types glossary, children element types, and the order and number of each element type. It also declares any attributes, entities, notations, processing instructions, comments, and PE references in the document.

Click on Discuss to view users comments.

Write your comments here: