blob: bd1e5cec0c4ba304d3d8cae75aeb6e8439effbca [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<title>
Displaying the result of evaluating an expression
</title>
</head>
<body>
<h1>
Displaying the result of evaluating an expression
</h1>
<p>
Displaying shows the result of evaluating an expression in the scrapbook editor.
</p>
<ol>
<li>
In the scrapbook page, either type an expression or highlight an existing expression to be displayed. For example: <code>System.getProperties();</code>
</li>
<li>
Click the <strong>Display</strong> button in the toolbar (or select <strong>Display</strong> from the selection's pop-up menu.)
</li>
<li>
The result of the evaluation appears highlighted in the scrapbook editor. The result displayed is either
<ul>
<li>
the value obtained by sending <code>toString()</code> to the result of the evaluation, or
</li>
<li>
when evaluating a primitive data type (e.g., an <em>int</em> ), the result is the simple value of the result.
</li>
</ul>
</li>
</ol>
<p>
For example:
</p>
<ul>
<li>
Type and highlight <code>new java.util.Date()</code> in the editor, and click <strong>Display</strong>. A result such as <code>(java.util.Date) Tue Jun 12
14:03:17 CDT 2001</code> appears in the editor.
</li>
<li>
As another example, type and highlight <code>3 + 4</code> in the editor, and press <strong>Display</strong>. The result <code>(int) 7</code> is displayed in the
editor.
</li>
</ul>
<p>
<img border="0" src="../images/ngrelc.png" alt="Related concepts" ><br>
<a href="../concepts/concepts-11.htm">Scrapbook</a>
</p>
<p>
<img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<a href="../tasks/tasks-152.htm">Executing an expression</a><br>
<a href="../tasks/tasks-150.htm">Inspecting the result of evaluating an expression</a><br>
<a href="../tasks/tasks-156.htm">Viewing runtime exceptions</a>
</p>
<p>
<img border="0" src="../images/ngrelr.png" alt="Related reference" ><br>
<a href="../reference/ref-34.htm">Java scrapbook page</a>
</p>
</body>
</html>