Академический Документы
Профессиональный Документы
Культура Документы
|
÷
ë
Ñ
D
A
o
·
// comments about the class
public class MyProgram
{
à
à
-
// comments about the class
public class MyProgram
{
// comments about the method
public static void main (String[] args)
{
|
// HelloWorld.java
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println(³Hello World!´);
}
}
||
// HelloWorld.java
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println(³Hello World!´);
}
}
|÷
// HelloWorld.java
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println(³Hello World!´);
}
}
|ë
// HelloWorld.java
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println(³Hello World!´);
}
}
|Ñ
|D
|A
|o
@ Restriction
Identifiers can not start with a digit
@ Conventions
for class names: HelloËorld
ü for constants: MAX
|·
|-
÷
@ Syntax:
w
w
w
w
w
w
w
w
@ Examples:
int count1, int count 2;
int count = 0;
String course1 = ³CMPT 126´;
÷|
÷÷
֑
ք
÷D
÷A
×
x
÷o
à
×
%&'(
)à
÷·
× %&'(
*
+
÷-
ë
ë|
ë÷
String course;
à 1
ëë