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


#1


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

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

	}
}


#2

Hi try to change the 1 to 0 here

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

#3

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


#4

it donot go to next exe..


#5

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


#6

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

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


#7

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