Hello friends, I am not managing to do the exercise 9/11 . Can someone help me?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

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

<In what way does your code behave incorrectly? Include ALL error messages.>

Será que você definir canDrive igual ao resultado da expressão ternária? Você pode usar o exemplo para ajudá-lo.

```
public static void main(String[] args) {
	
	int fuelLevel = 3;

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

}

}

<do not remove the three backticks above>
1 Like

Hi try to change the 1 to 0 here

(fuelLevel > 0) ? 'Y' : 'N';

it give d ans but it not accepted
means it donot go to next ques…

it donot go to next exe…

HI if you need help you should post your code or create a new topic with your code…

Hi i am stuck in the same exercise, code is as given below.

char canDrive = (fuelLevel>0)? ‘Y’:‘N’;

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.