PdfPrep.com

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

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

Exit mobile version