L-value 和 R-value.

  An L-value is something that can appear on the left side of an equal sign, An R-value is something that can appear on the right side of an equal sign.

  for example:

 a = b + ;

'a' is an L-value because it identifies a place where a result can be stored.

'b + 25' is an R-value because it designates a value.

  It sounds as though variable may be used as L-value but expressions may not, but this statement is not quite accurate,for example:

 int a[];
a[b + ] = ;

  Subscripting is in fact an operator so the construct on the left is an expression, yet it is a legitimate L-value because it identifies a specific location that we can refer to later in the program.

  Some operators, like indirection and subscripting, produce an L-value as a result.

上一篇:hibernate查询出的实体,set值后,自动更新到数据库


下一篇:Spring Boot的事务管理注解@EnableTransactionManagement的使用