Posted by: pureessence on: December 11, 2008
Eclipse has a scrapbook function that allows you to run Java code on the fly. Sometimes you just want to test out a simple piece of code without having to create another Java class, execute it in the main method or create a junit to test it out.
For example, today I wanted to make sure I remember integer division in Java correctly. So I simply just want to execute the following piece of code.
int a = 10; int b = 8; int c = 17; System.out.println(a / b); System.out.println(c / b);
In order to do that, create a new Scrapbook page in your project.

December 13, 2008 at 10:09 am
neat!