79,803 views
24 votes
24 votes
Write an expression that evaluates to true if and only if the value of the boolean variable workedovertime is true.

User Channae
by
3.0k points

1 Answer

8 votes
8 votes

Answer:

import java.io.*;

public class WorkedOvertime

{

public static void main (String[] args)

{

boolean workedovertime = false;

if ( workedovertime )

{

System.out.println("Evaluates to True");

}

else

{

System.out.println("Evaluates to False");

}

}

}

Step-by-step explanation:

This simple java program evaluates to true if and only if the value of the boolean variable workedovertime is true.

User Defus
by
2.6k points