A free program for Android, by ligi.
AJShA Android Java Shell is a lightweight application to execute and evaluate some Java code. It is based on an open-source implementation and can be easily modified.
The most powerful part of the app is the capability to interpret and execute any Java code that can be written in the Java programming language. This allows you to experiment with an app without having to build a project or even compile the app. The evaluation results can also be stored for later use.
AJShA is designed to be used as an easy-to-use tool for developers to quickly experiment with their applications.