Shared Flashcard Set

Details

CSI Java terms
Java keywords, method types, loop variations, general vocabulary
20
Computer Science
Undergraduate 1
03/02/2018

Additional Computer Science Flashcards

 


 

Cards

Term
Objects
Definition
Objects have:
Characteristics or attributes
construction schemes called constructors
sets of actions called methods
Term
Class definition
Definition
a text file that containts the specification fo a java class. car.java
Term
statement
Definition
the smallest syntactic unit in java
Term
String
Definition
a sequence of characters wrapped in a double quote
Term
Main
Definition
the java method where application execution begins. Always Static.
Term
Header Line
Definition
The first line of a class definition; it includes the name of the class.
Term
public
Definition

A java access qualifier. If a method is marked public, then it is directly accessible in any other class.

Term
Java Syntax Rules
Definition

Case Sensitive(system.out.println != System.out.println

 

Statements always end with a Semicolon

 

Packaging markers, such as " ", (), {}, must always match

 

 

 

Term
=
Definition
"=" is the assignment operator. it does not mean equality.
Term
Accessor Method
Definition

retrieves the value of an object's attributes.

ex  .getAge();

"." is the invocation symbol

Term
mutator method
Definition
Changes an object's state.
Term
Constructor statement
Definition

a statement used to construct an object from that class.

 

public Car(String what, double cap, double amt) {

         make =what;

         fuelCapacity = cap;

         fuelAmount = amt; 

}

Term
Formal Parameter
Definition

A variable given in a method or constructor definition.

ex. f(x)=3*x; "x" is the formal parameter

Term
void
Definition
Java keyword. Return type for a method indication no value is returned. Mutator methods, and methods that make "announcements" using print and println statements have return type void
Term
Actual Parameter
Definition

Associated w/ the formal parameter.

f(x)=3*x is the formal parameter

f(3)=3*x is the actual parameter

Term
identifiers
Definition
The names given to variables, constants, classes, $ methods.
Term
Car stacysCar = new Car("Honda",12.0,4.5);
Definition
Constructor. creates a new car object called stacysCar.
Term
Attribute (or Instance Variable)
Definition
A feature or characteristic of an  object.
Term
Length
Definition

A method in the String class. "Length" reports the length of the string; the nuber of charecters in the string. 

 

String s = "woof";

int len = s.length();

 

woof has a length of 4 characters, w=0, f=3

Term
import statement
Definition
Identifies a package or file that is to be included in (made available to) the class bearing the import statement
Supporting users have an ad free experience!