Shared Flashcard Set

Details

Java Basics
Objects and Classes
10
Other
11th Grade
12/12/2012

Additional Other Flashcards

 


 

Cards

Term
 A Java Program
Definition
a collection of objects talking to other objects by invoking each other's methods.
Term
Class
Definition
A template or blueprint that describes the kinds of state and behavior that objects of its type support
Term
Object
Definition
instance of the class.  made with the keyword 'new'.  Objects will have its won state, and access to all of the behaviors defined by its class
Term
State (instance variables)
Definition
Each object or instance of a class will have its own unique set of instance variables as defined in the class. Collectively, the values assigned to an object's instance variables make up the object's state
Term
Method - Behavior
Definition
Methods are where the class' logic is stored.  Methods are where algorithms get executed, and data gets manipulated
Term
Java Identifiers
Definition

names of the classes, variables, and methods.

There are conventions for naming methods and variables

Term

Conventions of

writing a variablename

Definition

camelCase  -- the first letter of the first word letter will be lower case and the first letter of the second word will be upper case or each word separated by underscore

Example:  numberOfCards

number_of_cards

Term
Convention for naming a Class
Definition
Class starts with the uppercase
Term
Conventions for naming methods
Definition

camelCase again

 

calculateAverageForClass()

Term
Keywords
Definition

Java has set of built-in keywords.  Example: new, Class, void, etc.

These keywords cannot be used as identifiers

Supporting users have an ad free experience!