File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes jxam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "jxam" Watch "jxam" New topic


satishind Reddy
Ranch Hand

Joined: Oct 17, 2000
Posts: 33
This question i got from jxam.
Employee is a person. For every employee, we keep a vector with the working hours, an integer for the salary and a variable that can be true or false whether or not the employee has a company car.

Indicate which of the following would be used to define the class members.
Given Options
a) Vector //ok
b) Employee
c) Object
d) boolean //ok
e) int //ok
but given answer is 'a' only can any one throw light on this...
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi satishind,
The question is not worded very well. When I first read it, I interpreted as you did. There would be one var of Vector type to hold hour objects, a second var of int type for salary and a third var of boolean type to hold the car info.
Based on the answer given, think they meant to imply that the Vector would contain all three objects: working hours, salary and car flag.
Hope that helps.

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Serge Plourde
Ranch Hand

Joined: Jun 23, 2000
Posts: 140
I believe you're right, Jane.
satishind Reddy
Ranch Hand

Joined: Oct 17, 2000
Posts: 33
Thanks Jane.
Hope we will not get this type of questions in real exam.
any how Thanks once again.
I agree. Here's the link:
subject: jxam
It's not a secret anymore!