Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » Java in the database » Java support in SQL Anywhere » The runtime environment for Java in the database


Printing to the command line

Printing to the standard output is a quick way of checking variable values and execution results at various points of code execution. When the method in the second line of the following Java code fragment is encountered, the string argument it accepts prints out to standard output.

String str = "Hello world";
System.out.println( str );

In SQL Anywhere, standard output is the database server messages window, so the string appears there. Executing the above Java code within the database is the equivalent of the following SQL statement.

MESSAGE 'Hello world';