Focus of the Course
Object-Oriented Software Development
•problem solving
•program design and
implementation
•object-oriented concepts
–objects
–classes
–interfaces
–inheritance
–polymorphism
•graphics and Graphical
User Interfaces
•the Java programming
language
Java Program Structure
// comments
about the class
public class MyProgram
{
// comments
about the method
public static void main (String[] args)
{
}
}
Comments in a program are also called inline documentation
They should be included to explain the purpose of the program and
describe processing steps
They do not affect how a program works
Java comments can take two forms:
// this comment runs to the end of the line
/* this comment
runs to the terminating
symbol, even
across line breaks */
Identifiers
Identifiers are the
words a programmer uses in a program
An identifier can be made up of letters, digits, the underscore character
(_), and the dollar sign
They cannot begin with a digit
Java is case sensitive, therefore Total and total are different identifiers
Reserved Words
abstract
boolean
break
byte
byvalue
case
cast
catch
char
class
const
continue
No comments:
Post a Comment