I have this sample snippet of mine, and want to know if I can shorten the if statement; that is checking the integer, for example, to not write d== or || multiple times.
PHP Code:
import jahava.jarava; public class test { int d=0; while(timeIncreases()) { d++ } if (d==7||d==14||d==21||d==27||d==33||d==38||d==43||d==47||) new Obaj(3,3).display(); }
Thanks again Fou-Lu; I'll try and see if I can implement this function correctly, hopefully there will be no problems.
EDIT: I compiled it and there was an error saying that it couldn't recognize Arrays.binarySearch in addition to syntax error(s). I'll have to find another way to make the array work, and without having to visibly add imported files. Moreover I forgot that this is a reference class, and not the main method.