Feature
Java
C++
Program exit value
Main() must be declared a void
i.e. a value cannot be returned
with a return statement. The only
way to do so is to call
System.exit()
Main() can return a value
Global variables
Are not allowed-every field or
method is associated with classes
and referred to by its fully
qualified name. This care is taken
to avoid conflicts
Are allowed
Filenames
Source file should have the same
name as the public class in it
No such rule
Comments
Three kinds i.e.
/* */ block comment
// single line comment
/** */ java doc comment
The java doc comment is
specially processed by the
javadoc program to produce
simple online documentation
Two kinds
/* */ block comment
// single line comment
9
Do'stlaringiz bilan baham: |