|
Transition from Turing to Java
Page history
last edited
by Steve Sweeney 9 years, 1 month ago
Basic Output: |
put "Hello World!"
|
System.out.println("Hello World");
|
Program Framework:
- Turing has no program framework. You type your commands in the Turing editor and Run the program.
- Java programs are complicated by the fact that they could potentially run on many systems with many types of hardware. While the framework can be confusing, it is necessary so that Java can be as versatile and powerful as it is.
- The Java framework is marked in blue bold.
- The parts you should change as a new Java programmer are marked in red bold.
- See this note on your First Java Program.
|
put "Hello World!" |
class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello World");
}
}
|
Variables & Assignment Operator: |
var age : int
var bankBalance : real
var name : string
age := 16
bankBalance := 103.24
name := "Fred Flintstone"
|
int age;
double bankBalance;
String name;
age = 16
bankBalance = 103.24
name = "Fred Flintstone"
|
|
|
|
|
Transition from Turing to Java
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
Comments (0)
You don't have permission to comment on this page.