The Java Development Toolkit (JDT) contributes a scrapbook facility that can be used to experiment and evaluate Java code snippets before building a complete Java program. Snippets are edited and evaluated in the Scrapbook page editor, with resultant problems reported in the editor.
From a Java scrapbook editor, you can select a code snippet, evaluate it, and display the result as a string. You can also show the object that results from evaluating a code snippet in the debuggers' Expressions View.

     Java development tools (JDT)
     Debugger

     Creating a Java scrapbook page
     Displaying the result of evaluating an expression
     Inspecting the result of evaluating an expression
	

     New Java Scrapbook Page wizard
     Java Scrapbook page
     Expressions view