comp 3 Flashcards
Anatomy of the statement
Arguments
pieces of information that are sent to a
method
Arguments
use to define Java class using any name.
Identifier
T or F
Identifiers must not use the reserved words
T
Pascal casing
- style that joins words which each word begins
with an uppercase letter.
- used in classes and variables
Upper Camel Casing
specifies the accessibility or scope of a field, method, constructor or class.
access specifiers
specifies the accessibility or scope of a field, method, constructor or class.
access specifiers
Types of Java Access Specifiers
Public
Private
Protected
Default
access level is everywhere
public
access level is only within the class.
Private
access level is within package and outside the package through child class.
protected
access level is only within the package
default
this method works without instantiating an object of the class
static
access specifier
public
method’s return type
void
it is a class, any arguments to this method must be string objects
string
the argument to this method is an array of strings
square brackets
the identifier of the array of strings that is the argument of this method
args
Types of indentions
K & R Indention
Allman style
named after Kernighan &
Ritchie (wrote the first book in
C language)
K & R Indention
named after Eric Allman (popularized the style)
Allman style
T or F
In this subject, the style
that will be use depends on the
preference of the students.
T