Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. package lambdas;
  2.  
  3. @FunctionalInterface
  4. interface ITestInt {
  5. public abstract boolean isNumberPos(int intValue);
  6. }
  7.  
  8. public class LambdaExercise3 {
  9.  
  10. public static void main(String[] args) {
  11.  
  12. ITestInt test = (intValue) -> (intValue >= 0)? true : false;
  13. System.out.println(test.isNumberPos(-5));
  14. System.out.println(test.isNumberPos(5));
  15.  
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement