CJCoding With Joseph

Read a Boolean Value

Read a boolean value (true or false) from standard input using sc.nextBoolean() and print its logical negation. For example, if the input is true, print:

Negation: false

Use the ! operator and System.out.println.

Expected Output:

Negation: false
Topics:
User Input
๐Ÿ“ฅ Auto-Input:
true\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.