Question: Java programming Please provide clear responses 1. Name three (or more) primitive data types in Java: 2. Circle which of following is(are) not primitive data
1. Name three (or more) primitive data types in Java: 2. Circle which of following is(are) not primitive data type: boolean, int, char, String, Scanner 3. Write three relational operators in Java and one logical operator in Java 4. Write statements that declares x y, zas integer, declare sum, ava as double. 5. Write the following equation in Java (assume x, y, r and zwere declared as integer) 2(x 2) x 1 6. What will be the value of x after the following code is executed? int x 55 y 60: if (x y) 7. What will be the values of x, y and z after the following statements are executed? int z 15 x 20 y 45: if x y) z 10; else l 10; 8. What would be the value of bonus after the following statements are executed? int bonus sales 85000; char dept 'S' if (sales 100000 1500 if (dept 'R') bonus 2000: else bonus else if (sales 75000) else bonus 1000; (if (dept 'R') bonus 12501 else bonus 0; What would be the value of sum and x after the following statements are executed? int while x 5) sum 10, what would be the value of discountRate after the following statements are executed? double char cust Type "B" switch (cust Type) discount Rate 08 break: case discount Rate 06; break case 'C' discount Rate 04 default discount Rate 0.0i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
