M2 Flashcards
defines a class, a
template for an object of derived type
HelloWorld
class HelloWorld –
access specifier/modifier,
public –
the main
method is declared private so that it is
accessible as part of the public interface of
the program.
false public
state of the method
static –
void – It returns void because the Java
interpreter X.
does not expect to receive or
process any output from the class
The X class is a part of the core Java language package of the Application Programming Interface (API)
System
The X method
is one of dozens of methods in the System
class.
println
JAVA LANGUAGE FUNDAMENTALS
ØIdentifiers
ØKeywords
ØComments
ØData types
X are names that are given by the
programmer as name of variables, methods
or functions, classes etc.
Identifiers
Java Comments are of three (3) types:
Java Comments are of three (3) types:
1. A single-line comment starting with //
2. A multi-line comment enclosed within /* */
3. A documentation or javadoc comment is
enclosed between /** and */
byte, short, int, long, float, double, boolean, char are
primitive data types
variable declaration syntax
; [= value;]
assigning a value to a variable syntax
= value;
X are used in
converting one data type (such as a
String) into another data type (such as
int or double).
Java Wrapper Classes
used in
wrapping a primitive value into an
object
Java Wrapper Classes