Computer programs manipulate data via expressions. This chapter introduces you to expressions in terms of simple and compound expressions.
Introducing Expressions
An expression is a combination of literals, variable names, method calls (discussed in Chapter 6), and operators. At runtime, the expression evaluates to a type referred to as the expression’s type.
If an expression is being assigned to a variable, their types must agree (it must be possible to convert from one type to the other without losing information) or else the compiler ...