Shouldn;t it print Y?


#1



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

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

	}
}


#2

Hey.

It does print Y.

What are you getting?


#3

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