AmbitionBox

Discover Best Places to work in India

Java Programming

Java Programming Questions and Answers

Showing 1 - 10 of 11 questions

1

Which method is called first by an applet?

a

start()

b

run()

c

init()

d

paint()

correct answer c
2

To display text on the applet........method is used.

a

showString()

b

drawString()

c

println()

d

printString()

correct answer b
3

To run an applet..........command is used.

a

run

b

java

c

appletviewer

d

applet

correct answer b,c
4

AppletViewer tool is available in which of the folder of JDK :

a

bin

b

lib

c

source

d

class

correct answer a
5

To display text in the applet status bar.........method is used

a

showStatus()

b

showStatusBar()

c

drawStatus()

d

drawStatusBar()

correct answer a
6

which of the following is an optional attribute of applet tag?

a

code

b

name

c

width

d

height

correct answer b
7

which package contains color class?

a

java.applet

b

java.awt

c

java.graphics

d

java.lang

correct answer b
8

The constructor for Font class is.............

a

Font(String name)

b

Font(string name,int style,int size)

c

Font(String name,int size)

d

Font(String name,int style)

correct answer b
9

The syntax of paint()method is.............

a

public void paint()

b

public void paint(String s)

c

public void paint(Graphics g)

d

public void paint(Graphics g,String s)

correct answer c
10

The(0,0) coordinates of applet window is located at......

a

at the center of the applet

b

at the center of the right edge of the applet

c

at the center of the left edge of the applet

d

at the upper-left corner of the applet

correct answer d
Select a company to compare with

vs

Similar Companies