Skip to content
Snippets Groups Projects
Verified Commit 13b0d7a1 authored by Ogilvie, D.H. (Duncan)'s avatar Ogilvie, D.H. (Duncan)
Browse files

fix operator precedence in language-java (closes #1)

parent 9adbee61
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,24 @@ public class DuncanExample {
boolean f1(int x, int y) {
return !(x>0) && (x > -2) ;
}
boolean f1_(int x, int y) {
return !(x>0) && x > -2;
}
boolean f2(int x, int y) {
return !(x>0) && (x > 0) ;
}
boolean f2_(int x, int y) {
return !(x>0) && x > 0 ;
}
boolean f3(int[] a, int k) {
return (k>9) && (a[k]>0) && (a[k] == a[k+1]) ;
}
boolean f3_(int[] a, int k) {
return k>9 && a[k]>0 && a[k] == a[k+1] ;
}
}
Subproject commit e473afcf07521afe49269ac7f30fe3d507a13be6
Subproject commit ea6ed0de82b0589f4cfea8073d51104a7ddb1d7c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment