Which of these correctly defines a field in a class?

a. private INT count;
b. public INT count;
c. private int count = "HI";
d. private int count;


d. private int count;
The primitive types are all lowercase. The last one is the correct one. You can't
assign a String to an int type.

Computer Science & Information Technology

You might also like to view...

On a sequence diagram, a lateral bar or vertical rectangle is used to represent:

A) messages sent between classes. B) the time sequence of activities. C) the focus of control, when an object is busy doing things. D) the lifeline for the class or object.

Computer Science & Information Technology

To use a Jini service, a Jini client must know __________.

a) the implementation of the service b) the interface of the service c) both the implementation and the interface d) none of the above

Computer Science & Information Technology

The nodes (leaves) of the DNS database tree structure are called ____________________ and have labels.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The time dimension of a variable's scope is referred to as the variable's ____.

A. execution time B. compile time C. lifetime D. processing time

Computer Science & Information Technology