Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Which variable names are legal, which are not? (5 pts) 1.1) 3abc 1.2) _myABC 1.3) _1_2_3_a_b_c 1.4) ABC 1.5) x@y 2. Calculations (5

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

1. Which variable names are legal, which are not? (5 pts) 1.1) 3abc 1.2) _myABC 1.3) _1_2_3_a_b_c 1.4) ABC 1.5) x@y 2. Calculations (5 pts): 2.1) 100 % 30 * 2 2.2) 25-8/10 2.3) 8*2%3 2.4) 13 % 15 2.5) 22% 11 3. Which Java code is correct? Which is not? Explain the reason if it is not correct. (6 pts) 3.1) int 3.2) 3.3) double char int 3 W = 1; double pi= pi * 2; X; Y; X; W; pi; 4. How do I check an integer variable, x, is greater than 5 but less than 20? Please write down your Java expression (2 pts). 5. Please fill out the table (result should be either true or false) (5 pts) Result 6.2) 6. What will be the output of each code part below? (each code part is independent) (4 pts) 6.1) ! (99 > 100) (1> 0) && (2> 3) && (102 20) // (6 != 2) int if (A % 2 == 0) { A = A/2; } else { } Expression (20

Step by Step Solution

There are 3 Steps involved in it

Step: 1

The detailed answer for the above question is provided below 1 Variable Names 11 Illegal Variable na... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Financial Accounting

Authors: Christopher Burnley, Robert Hoskin, Maureen Fizzell, Donald

1st Canadian Edition

1118849388, 9781119048572, 978-1118849385

More Books

Students also viewed these Programming questions