Question: Please explain this in detils I didn't understand from this any thing CHAPTER2 Using Data in which values are used with operators. The associativity ofevery

 Please explain this in detils I didn't understand from this any thing CHAPTER2 Using Data in which values are used with operators. The associativity ofevery operator is either right-to-left or left-to-right. An identifier that can Please explain this in detils

I didn't understand from this any thing

CHAPTER2 Using Data in which values are used with operators. The associativity ofevery operator is either right-to-left or left-to-right. An identifier that can appear on the left side of an assignment statement sometimes is referred to as an Ivalue. A numeric constant like 25 is not an value; it is only an rvalue, or an item that can appear only on the right side of an assignment statement. A variable can be used as an Ivalue or anrvalue, but a literal number can only be an rvalue 54 The following variable declaration also declares a variable of type int named myAge, but no valu e is assigned at the time of creatio int myAge; n: If you attempt to display a variable that has not been assigned a value, or use it as part of a calculation, you receive an error message stating that the variable might not have been initialized. Java protects you from inadvertently using the unknown value (known as a garbage value) that is stored in an uninitialized variable. When you learn about creating classes in the chapter Using Methods, Classes, and Objects, you will discover that variables declared in a class, but outside any method, are autmatically initialized for you. You can declare multiple variables of the same type in separate statements. You also can declare two (or more) variables of the same type in a single statement by separating the variable declarations with a comma, as shown in the following statement: int myAge 25, yourAge 19; By convention, programmers declare most variables in separate statements. You might declare multiple variables in the same statement only if they are closely related. Remember that even if a statement occupies multiple lines, the statement is not complete until the semicolon is reached. You can declare as many variables in a statement as you want, as long as the variables are the same data type. However, if you want to declare variables of different types, you must usea separate statement for each type. Declaring Named Constants for which the contents can change. If a named A variable is a named memory location location's value should not change during the execution of a program, you can create it to be a named constant. A named constant is also known as a symbolic constant. A named constant is similar to a variable in that it has a data type, a name, and a value. A named constant differs from a variable in several ways

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!