Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
jb14.0 lyambds
//'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)); StringTest strTest = ($s, $sub) -> $s.indexOf($sub) > 0; System.out.println(strTest.test("это тест лябд", "тест")); System.out.println(strTest.test("это тест лябд", "тест1")); } } interface MyValue{ double myValue(); } interface MyParamValue{ double myParamValue(double n); } interface MyNumericTest{ boolean test(int x, int y); } interface StringTest{ boolean test(String s, String sub); }
run
|
edit
|
history
|
help
0
Max palindrome string
Product of Array Except Self
MyBirdClass
Neeraj
pow x^n
JavaQ5
Hi
Recursive list fields
Construct Tree from Ancestor Matrix
assign