Difference between revisions of "Calico Java"
From IPRE Wiki
Doug Blank (Talk | contribs) |
Doug Blank (Talk | contribs) |
||
Line 40: | Line 40: | ||
JavaGraphics.main(); | JavaGraphics.main(); | ||
</pre> | </pre> | ||
+ | |||
+ | == calico object == | ||
+ | |||
+ | Java now support [[Calico: calico object]] and interaction with other languages. Can also work via [[ICalico]] via notebooks in a web browser. |
Revision as of 19:43, 17 April 2014
Calico Java
To use, do the following:
- Start Calico
- From menu -> "Calico" -> "Languages" and check "Java"
- You can then:
- select menu -> Shell -> "Java", and type Java programs, and statements in the shell
- create a new Java program (menu -> File -> New)
You can enter into Calico whole Java programs, statements, and even partial statements. Note that you currently must press enter twice if the line does not end in a semi-colon.
java>>> int x = 1; java>>> x 1
Examples
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } } HelloWorld.main(new String[0]);
import Graphics; public class JavaGraphics { public static void main() { Graphics.WindowClass window = Graphics.Window("Testing", 400, 100); } } JavaGraphics.main();
calico object
Java now support Calico: calico object and interaction with other languages. Can also work via ICalico via notebooks in a web browser.