Which Java statement checks the status of an attribute called trafficLight?

Posted by: Pdfprep Category: C1000-004 Tags: , ,

Consider the definition of the code table item in the following extract from TrafficLights.ctx:

Which Java statement checks the status of an attribute called trafficLight?
A . if (trafficLight.equals(curam.codetable.TRAFFICLIGHT
B . GO)) {
C . if (trafficLight.equals(curam.codetable.TRAFFICLIGHT
D . TL1)) {
E . if (trafficLight.equals(curam.codetable.TRAFFICLIGHT
F . GREEN)) {
G . if (trafficLight.equals(“Green”)) {

Answer: A

Leave a Reply

Your email address will not be published.