Displaying the Result of Evaluating an Expression
Displaying shows the result of evaluating an expression in the scrapbook editor.
-
In the scrapbook page, either type an expression or highlight an existing expression to be displayed. For example:
System.getProperties();
-
Click the Display button in the toolbar (or select Display from the selection's pop-up menu.)
-
The result of the evaluation appears highlighted in the scrapbook editor. The result displayed is either
-
the value obtained by sending
toString()
to the result of the evaluation, or
-
when evaluating a primitive data type (e.g., an int ), the result is the simple value of the result.
For example:
-
Type and highlight
new java.util.Date()
in the editor, and click Display. A result such as (java.util.Date) Tue Jun 12
14:03:17 CDT 2001
appears in the editor.
-
As another example, type and highlight
3 + 4
in the editor, and press Display. The result (int) 7
is displayed in the
editor.
Scrapbook
Executing an expression
Inspecting the result of evaluating an expression
Viewing runtime exceptions
Java scrapbook page