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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » Java in the Database » The runtime environment for Java in the database

Strings in Java and SQL Next Page

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 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';