21-05-2012, 03:14 PM
Introduction to Java Applications
java2.ppt (Size: 1.18 MB / Downloads: 66)
Introduction
In this chapter
Introduce examples to illustrate features of Java
Two program styles - applications and applets
A First Program in Java: Printing a Line of Text
Application
Program that executes using the java interpreter
Sample program
Show program, then analyze each line
A Simple Program: Printing a Line of Text
Blank line
Makes program more readable
Blank lines, spaces, and tabs are white-space characters
Ignored by compiler
A Simple Program: Printing a Line of Text
Name of class called identifier
Series of characters consisting of letters, digits, underscores ( _ ) and dollar signs ( $ )
Does not begin with a digit, has no spaces
Examples: Welcome1, $value, _value, button7
7button is invalid
Java is case sensitive (capitalization matters)
a1 and A1 are different
For chapters 2 to 7, use public keyword
Certain details not important now
Mimic certain features, discussions later