Alex Titov
Alex Titov

Reputation: 101

lot more conditional execution in Java code

How to implement condition: a lot more, in Java 8? I want to use a "lot more" condition like:
1.0 << 10000 in my algorithm. How can I realize it?

assert d > Lambda: "The parameter d aren't much larger than Lambda, the method in section 7.3. not applicable";

How can I use check d>>Lambda in Java, d>Lambda is not best?

Upvotes: 0

Views: 84

Answers (1)

DavidGaray
DavidGaray

Reputation: 26

Remember to use -ea flag to enable assertions. >> operator does not exist maybe you can implement some other logic as in x/1000>1, for instance.

~$ java -ea -classpath /home/admin Boo
Exception in thread "main" java.lang.AssertionError: some text
at Boo.main(Boo.java:7)
~$ cat Boo.java 

public class Boo {

public static void main(String[] args) {

int i =100;
  assert i < 99 : "some text" ;

} 

}

Upvotes: 1

Related Questions