Java code containing ! In for loop -


how ! big in loop affects program.is there checking done between , big?

public int numberofmoves(int size) {      int power=2;     int[] moves = new int[105];     int pocet = 0;     boolean big=false;     (int i=1;i<105&&!big;i++) {         int num=1;         (int j=0;j<power;j++) num*=i;         if (num>size) big=true; else {             moves[pocet]=num;             pocet++;         }     } } 

! negation operator, means !true == false , !false == true. in case, outer loop condition "loop while i<105 , big false"


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -