CJCoding With Joseph

Boolean isPositive Method

Write a method isPositive(int n) that returns true when n is greater than 0 and false otherwise. Call it with 5 and print the result:

true

Use System.out.println.

Expected Output:

true
Topics:
Methods
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.