• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/17

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

17 Cards in this Set

  • Front
  • Back

What is a class?

A Java file that describes a general category in terms of data and behavior.

What is an object?

One specific instance of a class.

What is a data type?

A peice of information with a specific size and value.

List and explain the two categories of data types.

Primitive: The most basic building blocks of information. They include, among others, int, char, double, boolean.



Referenece/Object: More complex collections of information, generally created from a collection of primitive data types.

What is object state?

The set of all values for an object's fields. Two objects of the same class can have different states.

What is a method?

A collection of statements grouped together to perform a specific task. It is a behavior that can be called upon by name from other parts of the program.

What is a comment?

Specific code that is ignored by the compiler. Comments act as notes for programmers to make code easier to understand.

Show examples of comments

// single line comment



/* single line comment */



/*


* Multi


* Line


* Comment


*/

What is a JavaDoc comment?

Comments that are used for documentation purposes. Special keywords can be used such a as @author @param. These comments will automatically be generated to HTML for API documentation.

Show an example of JavaDoc documentation.

/**


* An example of documentation.


* @author Your Name


* @version version (eg: 1.0)


*/

What are VISIBILITY MODIFIERS?

These grant or limit access (scope) to methods and variables within a class.

Name and describe two visibility modifiers.

Private: Access to variable or method declared private is restricted to the class they reside.



Public: All code has access to variable or method declared public regardless of where that code resides.

What is a method parameter?

Input a method can accept to perform an action.

What is method return?

Output as defined in the method signature.

What is a return type and what are some examples?

A return type is the type of data that will make up a method's final output.



Examples: int, String, double.



In addition to primitive data types, methods can return reference / object data.

What is the return type of a method that doesn't have to give any sort of output?

Void

What is a method signature and what are its elements?

A combination of elements in a specific order to declare a method.



Elements:


modifier return-type name(parameters)



Example:


public int getSum(int a, int b)