



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Computer Programming 2 Operators 1
At the end of this activity, you should be able to: Write and evaluate expressions to compute values Write program using different operations Understand and use the different kind of operators in a java program.
NetBeans IDE 8.2 which could be downloaded from https://netbeans.org/downloads/ Java Standard Edition (SE) Development Kit 8 (JDK8).
1: What is the result? A: 6
903 1 B: 6 2.4 -2 93 23 C: syntax error Assessments
D: 30 / 5 12.0/ 10/5-8/ 3412 + 15 42%2 + 1%
2: How many errors are there? A: 3 B: 2 C: 1 D: 0
3: What is the result? A: five + 5 1 0 B: 10 1 0 C: 5+
7: What is the output of this statement System.out.println(x >> y);? A: 3 B: 2 C: 1 D: 0
8: What is the output of this statement System.out.println(a && b);? A: true B: false C: 1 D: 0 9: What is the output of this statement System.out.println(a || b);? A: true B: false C: 1 D: 0 10: What is the output of this statement System.out.println(b? a : b);? A: true B: false C: 1 D: 0 Create a NetBeans project for problem no. 6 below. The project name should be as follows:
Computer Programming 2 Operators 5 Project Name: Lab003_<lastname_firstname> Example: Lab003_Blanco_Maria The Java filename for No. 5 should be MaxAndMin.java Compress the NetBeans project into .rar or .zip format. Only NetBeans project compressed in .rar or .zip format will be accepted.