Hi All,
Got stuck in Ternary.
The 'Next button is disabled and not able to move to the next lesson.Though I get the result as expected, I’m getting the following message
Did you set canDrive
equal to the result of the ternary expression? You can use the example to help you.
Here is my code
public class Ternary {
public static void main(String args) {
char fuelLevel = 2 ;
char canDrive = (fuelLevel != 3)? ‘Y’ :‘N’;
System.out.println(canDrive);
Thanks in Advance !..please help me