Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. For each of the following, indicate if it is a valid Java identifier or not. (An identifier is any word you use in a

1.

For each of the following, indicate if it is a valid Java identifier or not. (An identifier is any word you use in a program, not just a variable name.)

If it is valid, explain what it would identify using the normal naming conventions.

If it is not valid, explain why it is not valid.

a. 92ndStreet

Valid?

Choice 1 of 2:Yes

Choice 2 of 2:No

2.) Please look through the items below:

Line #01: public class HelloWorld { Line #02: Line #03: public static void main(String[] args) { Line #04: Line #05: int[] intVals = new int[7]; Line #06: Line #07: for (int i = 0; i < intVals.length; i++) { Line #08: Line #09: intVals[i] = (int) Math.pow(2, 7); Line #10: Line #11: if (intVals[i] % 3 == 0) Line #12: Line #13: System.out.println(intVals[i] + Line #14: " is a multiple of 3"); Line #15: } Line #16: Line #17: } Line #18: Line #19: }

a) Indicate each Reserved Word, including the line number(s) it appeared, from the code above. (indicate 7 reserved words)

b) Indicate each class name, including the line number(s) it appeared, from the code above. (3 class names)

c) Indicate each variable or method name, including the line number(s) it appeared, from the code above. ( 5 variable or method name)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions

Question

=+4. Who are credible sources and opinion leaders for this public?

Answered: 1 week ago

Question

demonstrate the importance of induction training.

Answered: 1 week ago