Java Phases Flashcards
2 parts of a java program
Package and Main method
Accessible to all
Public Access Modifier
Accessible within class
Private Access Modifier
Accessible within members of package and inherits to be accessed
Protected Access Modifier
Accessible within the package
Default/ Blank Access Modifier
Structure of a method
Access modifier - return type - method name - parameters -body
Structure of for loop
(initialization; condition; iteration)
Structure of Instantiation
Person name = new Person(); | | | | class - object - key - Constructor word
Phases of Java
Text Editor - Test Java - Java Compiler - test class - Java interpreter
3 ways to comment
// - Single Line
/* * / - Multi-line
/** * / - Documentation
Statement are always terminated by
Semicolon (;)
Blocks statement are bounded by
Brackets ({})
Identifiers
- Field variables
- Local variables
- Parameters
Structure of a variable
< datatype> < names> [= initiating value]
Must be nouns and begin with lowercase
Variables