Unable to move ahead in this exercise


#1

I am using the code:

public class IfElseIf {
public static void main(String[] args) {
int fuelLevel = 3;
char canDrive = ( fuelLevel > 0 ) ? 'Y' : 'N';
System.out.println(canDrive);

}

}

But its not working, and i am unable to move ahead in this exercise, please help


Ternary.java
#2

Is this the lesson you are having trouble with?

https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/ternary-conditional

If so, it would appear you have made some unnecessary changes.