1.  An applet can play an audio file represented by the AudioClip interface in the java.applet package. The AudioClip interface has how many methods?


2
3
1
4


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  What is the length of the application box made by this program ?
import java.awt.*;
import java.applet.*;
public class myapplet extends Applet {
public void paint(Graphics g) {
g.drawString(''PrintExam'', 20, 20);
}
}


20
50
100
System dependent


Answer

 Option

the code in pain() method – g.drawString(“PrintExam”,20,20); draws a applet box of length 20 and width 20.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  What is the length of the application box made by this program ?
import java.awt.*;
import java.applet.*;
public class myapplet extends Applet {
Graphic g;
g.drawString(‘’PrintExam’’, 20, 20);
}


20
Default value
Compilation time Error
Runtime Error


Answer

 Option

To implement the method drawString we need first need to define abstract method of AWT that is paint() method. Without paint() method we can not define and use drawString or any Graphic class methods.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  What does AWT stands for ?


All Windows Tools
All Writing Tools
Abstract Window Toolkit
Abstract Writing Toolkit


Answer

 Option

AWT stands for Abstract Window Toolkit, it is used by applets to interact with the user.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  What is used to run Applet ?


An html file
An AppletViewer tool(for testing purpose)
Both A & B
None of the above


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report