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



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';



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.