concept construct in category java

appears as: constructs, construct, A construct, constructs, construct
Java SE 11 Programmer I Certification Guide

This is an excerpt from Manning's book Java SE 11 Programmer I Certification Guide.

Local variables are defined within a method. They may or may not be defined within code constructs such as if-else constructs, looping constructs, or switch statements. Typically, you’d use local variables to store the intermediate results of a calculation. Compared to the other three variable scopes listed previously, they have the shortest scope (life span).

The result of a variable or an expression used in an if construct must be a boolean/ Boolean. Assume the following definitions of variables:

Figure 6.8 The if-else-if-else construct is like a series of questions and answers.
OCA Java SE 8 Programmer I Certification Guide

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.

Local variables are defined within a method. They may or may not be defined within code constructs such as if-else constructs, looping constructs, or switch statements. Typically, you’d use local variables to store the intermediate results of a calculation. Compared to the other three variable scopes listed previously, they have the shortest scope (life span).

A nested if construct is an if construct defined within another if construct. Theoretically, there’s no limit on the number of levels of nested if and if-else constructs.

Whenever you come across nested if and if-else constructs, you need to be careful about determining the else part of an if statement. If the preceding statement didn’t make a lot of sense, look at the following code and determine its output:

Figure 5.7. The if-else-if-else construct is like a series of questions and answers.
ejavaguru
e
AspectJ in Action, Second Edition

This is an excerpt from Manning's book AspectJ in Action, Second Edition.

  • A construct for selecting join points— Implementing a crosscutting concern requires selecting a specific set of join points. For example, the tracing aspect discussed earlier needs to select only the public methods in the system. The pointcut construct selects any join point that satisfies the criteria. This is similar to an SQL query selecting rows in database (we’ll compare AOP with databases in section 1.5.2). A pointcut may use another pointcut to form a complex selection. Pointcuts also collect context at the selected points. For example, a pointcut may collect method arguments as context. The concept of join points and the pointcut construct together form an AOP system’s join point model. We’ll study AspectJ’s join point model in chapter 3.
  • A construct to alter program behavior— After a pointcut selects join points, you must augment those join points with additional or alternative behavior. The advice construct in AOP provides a facility to do so. An advice adds behavior before, after, or around the selected join points. Before advice executes before the join point, whereas after advice executes after it. Around advice surrounds the join point execution and may execute it zero or more times. Advice is a form of dynamic crosscutting because it affects the execution of the system. We’ll study AspectJ’s dynamic crosscutting implementation in chapter 4.
  • Constructs to alter static structure of the system— Sometimes, to implement crosscutting functionality effectively, you must alter the static structure of the system. For example, when implementing tracing, you may need to introduce the logger field into each traced class; inter-type declaration constructs make such modifications possible. In some situations, you may need to detect certain conditions, typically the existence of particular join points, before the execution of the system; weave-time declaration constructs allow such possibilities. Collectively, all these mechanisms are referred to as static crosscutting, given their effect on the static structure, as opposed to dynamic behavior changes to the execution of the system. We’ll study AspectJ’s static crosscutting support in chapter 5.
  • After you identify join points useful for a crosscutting functionality, you need to select them using the pointcut construct.