Is anything wrong in this Program?


#1

public class Ternary {
public static void main(String[] args) {

	int fuelLevel = 3;

	char canDrive;
canDrive=(fuelLevel>0)?'Y':'N';
	System.out.println(canDrive);

}

}


#2

You didnt do anything wrong. I checked on my IDE. Can you please list the specific instructions or get a screen shot? Thankyou


#3

Hi There! I'm Chris.

Did the same as amauel2, found that there is nothing wrong with it... Must be a bug or that you are missing some instructions

Good Luck!
-Chris