Code Playground

The Code Playground is a code editor for testing your Java code. Code is compiled automatically and results are displayed in your browser. There’s a PLAYGROUND (non-edit) mode, and an edit mode for modifying and creating classes.

Caution

To avoid unintentionally changing existing code in your project, make sure that the editor is set to PLAYGROUND.

You can return a class and view its members in the Result pane. For example, returning the Activity class shows the class fields and methods.

../../_images/code-tool-return.png

You can test your classes and call Dari APIs. For example, the following code creates multiple objects of the User class and calls the Dari Query API to return the JSON results.

../../_images/code-return-query.png

You can edit existing classes or create new classes in a project. For a project running locally, saved changes are made to the source.

To modify an existing class, open the drop-down menu and select a class.

../../_images/code-update.png

To create a new class, open the drop-down menu and select the New Class option.

../../_images/new-code.png