Java Syntax Flashcards
argument
pieces of info passed into a method
method syntax
.method(): dot separates the method from class/object it references
object syntax
class.object: dot separates a specific object being identified by its class
.println()
built in method that prints the argument passed into it and advances insertion point to next line for subsequent output
.print()
built in method that prints the argument passed into it and doesn’t advance insertion point subsequent output is in the same line as current output
.out
object of built in print stream class which is subclass of system to which several methods, including println(), belong
.print()
built in method that prints the argument passed into it and doesn’t advance insertion point subsequent output is in the same line as current output
“public class”
keywords used to initiate the definition of a new class
System
built-in java class
conditions for class identifier
1) must begin with character that is either a letter of an alphabet, an “”, or “$”
2) can’t be a reserved keyword or reserved word identifying a primitive value
3) can only contain characters, digits, “”, or “$”
Pascal Case
convention for capitalizing the first letter of each sub-word in a compound word identifier
camel case
convention for capitalizing first letter of subsequent sub0words of compound word identifier
access specifier
defines the circumstances under which a class can be accessed and the other classes that have the right to use a class
class header
line that initiates the defining of a new class, the access it allows, and the identifier it can be referenced by
class body
the attributes and methods that define the class
- inside curly brackets
- has line spacing syntax rules