Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
jb14 L
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { System.out.println("Hello, World!"); MyValue myVal; myVal = ()-> 98; MyParamValue myPValue = $n -> 1/$n; System.out.println(myVal.myValue()); System.out.println(myPValue.myParamValue(4)); MyNumericTest test1 = ($x, $y) -> $x % $y == 0; System.out.println("test1 " + test1.test(4, 2)); System.out.println("test1.1 " + test1.test(4, 6)); MyNumericTest test2 = ($x, $y) -> $x < $y; System.out.println("test2 " + test2.test(3, 1)); System.out.println("test2.1 " + test2.test(3, 4)); MyNumericTest test3 = ($x, $y) -> ($x<0 ? -$x : $x) == ($y<0 ? -$y : $y); System.out.println("test3 " + test3.test(2, -2)); System.out.println("test3.1 " + test3.test(2, 2)); System.out.println("test3.2 " + test3.test(3, -2)); } } interface MyValue{ double myValue(); } interface MyParamValue{ double myParamValue(double n); } interface MyNumericTest{ boolean test(int x, int y); }
run
|
edit
|
history
|
help
0
K closest points
t-primes
program to count number of lines
Find merge point of two linkedlists - solution 1
1.5
Opr
Increment
Only I love u
JAVA sidebar pattern match
Jh