

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A cse 11 quiz 1 focused on operator precedence and valid java identifiers. Students are required to evaluate given expressions using the operator precedence table and identify valid identifiers. The document also covers the naming convention for method names and the meaning of the '!' symbol in computer lingo.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


int a = 2; int b = -1; int c = 7; boolean exp1 = a + b * c >= a + c * b; _________ (value of exp1)
boolean exp2 = !(c + a < b); _________ (value of exp2)
boolean exp3 = b - a >= c; _________ (value of exp3)
boolean z = exp1 && !exp2 || exp3; System.out.println( "z = " + z ); ____________________
z = exp1 || exp2 && exp3; System.out.println( "z = " + z ); ____________________
b = --b + ++a % 4 * c++ * 2; System.out.println( "a = " + a ); ____________________
System.out.println( "b = " + b ); ____________________
System.out.println( "c = " + c ); ____________________
int a = 9; int b = 3; int c = 4;
System.out.println( (a + b) + c + " = " + a + b + c );
System.out.println( a + (b + c) + " = " + (a + b) + c );
System.out.println( a + b + c + " = " + a + (b + c) );
int x = 5, y = 5, z = 5;
if ( x == 5 ) { if ( y >= 7 ) z = z + 4; } else { z = z + 2; }
int x = 5, y = 5, z = 5;
if ( x == 5 ) if ( y >= 7 ) z = z + 4; else z = z + 2;
3 * 2 + 5 * 4