TAs: after conclusion of demos
Read chap.2 section 7.1, 7.2 (arrays)
class: directions to construct an object
object:
- a collection of data (attributes)
- algorithms (methods)
an object is an instantiation of a class.
each object has its own unique data storage all objects can share algorithms.
javadoc -author Lincoln.java
args[0] = "-author"
args[1] = "Lincoln.java"
in : input from the console (keyboard)
out: output to console (monitor)
err: error output to console (monitor)
in, out and err are members of the class System.
in is an object of class InputStream
out, err are objects of class PrintStream
Syntax defines the way we can compose letters and symbols into a java program.
semantics defines the meaning of a statement in a program
zaphod = 42 ; syntactically correct!
CORRECT
int zaphod ;
zaphod = 42 ;
semanticallt correct!
WRONG!
boolean zaphod ;
zaphod = 42 ;
not semanticallt correct!
No comments:
Post a Comment