Okay so I cannot understand this part no matter how many times I read it.
Here is the lesson : https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/ternary-conditional?action=resume
This is the error -
Ternary.java:6: error: illegal start of expression
char canDrive = (fueLevel = = 3) ? ‘Y’ : ‘N’;
^
1 error
My code -
public class Ternary {
public static void main(String[] args) {
int fuelLevel = 3;
char canDrive = (fueLevel = = 3) ? 'Y' : 'N';
System.out.println(canDrive);
}
}
Thanks In Advance!