Question: Which of the following words indicates an objects reference to itself? a. public b. that c. this d. protected 1.00000 points QUESTION 2 Which of

Which of the following words indicates an objects reference to itself?

a.

public

b.

that

c.

this

d.

protected

1.00000 points

QUESTION 2

Which of the following is used to allocate memory for the instance variables of an object of a class?

a.

the reserved word public

b.

the operator +

c.

the reserved word static

d.

the operator new

1.00000 points

QUESTION 3

What HTML tags begin and end a web page?

a.

b.

c.

d.

1.00000 points

QUESTION 4

The name of an object holds the ________ of the object.

a.

name

b.

address

c.

value

d.

size

1.00000 points

QUESTION 5

Which of the following is the member access operator?

a.

->

b.

+

c.

.

d.

-

1.00000 points

QUESTION 6

Which package will you most likely have to import in order to write a GUI program?

a.

java.text.*

b.

java.io.*

c.

java.net.*

d.

java.awt.*

1.00000 points

QUESTION 7

Which of the following is an area of secondary storage used to hold information?

a.

variable

b.

file

c.

constant

d.

buffer

1.00000 points

QUESTION 8

Which of the following is not a method of the class JTextField?

a.

setEditable

b.

addActionListener

c.

setText

d.

setVisible

1.00000 points

QUESTION 9

Which of the following sets the background color of the applet to white?

a.

setAppletColor(white);

b.

setBackground(Color.white);

c.

setAppletColor(white);

d.

setBackground(white);

1.00000 points

QUESTION 10

What is Color.white?

a.

A static final object of the class Color that represents the color white

b.

An object of the class Graphics that represents the color white

c.

A constructor of the class Color

d.

A method of the class Color

1.00000 points

QUESTION 11

What class can be used to input Strings?

a.

String

b.

BufferedReader

c.

StringTokenizer

d.

StringBuffer

1.00000 points

QUESTION 12

Which object waits for and responds to an event from a GUI component?

a.

GUI listener

b.

window listener

c.

action listener

d.

button listener

1.00000 points

QUESTION 13

Which of the following GUI component is used to get input into a GUI program?

a.

JTitle

b.

JLabel

c.

JTextField

d.

JText

1.00000 points

QUESTION 14

char[][] array1 = new char[15][10]; How many dimensions are in the array above?

a.

0

b.

1

c.

2

d.

3

1.00000 points

QUESTION 15

In Java, all variables declared using a class are ____.

a.

operators

b.

reference variables

c.

primitive variables

d.

constants

1.00000 points

QUESTION 16

What class can be used to break a String into separate parts?

a.

StringTokenizer

b.

StringBuffer

c.

Strings

d.

Separate

1.00000 points

QUESTION 17

char[][] array1 = new char[15][10]; What is the value of array1[3].length?

a.

10

b.

0

c.

15

d.

2

1.00000 points

QUESTION 18

char[][] array1 = new char[15][10]; How many columns are in the array above?

a.

15

b.

0

c.

10

d.

2

1.00000 points

QUESTION 19

To run a java program from a web page, which of the following classes has to be extended?

a.

JTextField

b.

Container

c.

JFrame

d.

JApplet

1.00000 points

QUESTION 20

An expression such as str.length(); is an example of a(n) ____.

a.

data member

b.

static method

c.

non static method

d.

class

1.00000 points

QUESTION 21

Does an applet compile like any other Java application program?

a.

Yes -- except the web browser compiles the applet code.

b.

No -- applets are .applet files and not .java files.

c.

No -- applets do not produce a .class file because they dont have a main method.

d.

Yes -- it is compiled as an application program and produces a .class file.

1.00000 points

QUESTION 22

The Date class has multiple constructors, therefore it is _________.

a.

overloaded

b.

deprecated

c.

unknown

d.

overridden

1.00000 points

QUESTION 23

What is another name for an instance of a class?

a.

field

b.

method

c.

object

d.

class

1.00000 points

QUESTION 24

char[][] array1 = new char[15][10]; What is the value of array1.length?

a.

0

b.

2

c.

10

d.

15

1.00000 points

QUESTION 25

What class can be used to format a number into currency?

a.

Decimal

b.

Number

c.

NumberFormat

d.

Currency

1.00000 points

QUESTION 26

Which of the following is NOT added to a content pane?

a.

text areas

b.

title bar

c.

labels

d.

buttons

1.00000 points

QUESTION 27

If you need to concatenate Strings, a more efficient way would be to use _________ objects.

a.

StringBuffer

b.

String

c.

StringTokenizer

d.

Append

1.00000 points

QUESTION 28

Which class is part of the package java.awt?

a.

JOptionPane

b.

JApplet

c.

Container

d.

JButton

1.00000 points

QUESTION 29

What is the function of the reserved word class?

a.

It acts as a modifier.

b.

It has no function.

c.

It defines a data type and allocates memory.

d.

It defines only a data type; it does not allocate memory.

1.00000 points

QUESTION 30

char[][] array1 = new char[15][10]; How many rows are in the array above?

a.

15

b.

0

c.

10

d.

2

1.00000 points

QUESTION 31

Which of the following is a reserved word in Java?

a.

extends

b.

event

c.

pane

d.

inheritance

1.00000 points

QUESTION 32

What method is automatically called when an applet is first loaded?

a.

actionPerformed

b.

JApplet

c.

the constructor

d.

init

1.00000 points

QUESTION 33

12 point font is how many inch(es)?

a.

6

b.

1/6

c.

72

d.

1

1.00000 points

QUESTION 34

Which method is used to register a listener object to a button object?

a.

buttonListener()

b.

eventButton()

c.

addActionListener()

d.

registerButton()

1.00000 points

QUESTION 35

Constructors have the same name as the ____.

a.

data members

b.

member methods

c.

class

d.

package

1.00000 points

QUESTION 36

Which modifier is used to build classes on top of classes that are interfaces?

a.

public

b.

implements

c.

new

d.

private

1.00000 points

QUESTION 37

Java applets are loaded from what type of file?

a.

.txt

b.

.html

c.

.class

d.

.java

1.00000 points

QUESTION 38

Applets are embedded in ____ documents.

a.

TCP

b.

HTTP

c.

VRML

d.

HTML

1.00000 points

QUESTION 39

A(n) ____ is a method of a class that is automatically executed when an object of the class is created.

a.

package

b.

constructor

c.

interface

d.

inheritance

1.00000 points

QUESTION 40

How many constructors can a class have?

a.

1

b.

Any number

c.

0

d.

2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!