Ternary Conditional


#1

<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/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.>
can some one explain how you get the letters to appear. I am a little confuse

```

public class Ternary {
public static void main(String[] args) {

	int fuelLevel = 3;

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

}

}

<do not remove the three backticks above>

#2

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