Unit 3 - Methods Vocabulary Flashcards
Modular
To divide and conquer a complex problem. The idea of dividing and conquering breaks down a larger task into smaller and easier components.
Constant
A variable that is assigned to a value that cannot be changed (eg: Math.sqrt). Capital letters are used to help others define the constants.
Final
A keyword used for a constant or a method that stays the same throughout the program. Final is used to define a constant
Static
A keyword used to define a value that stays the same throughout the class. Static is used for global variables above the main method
Method
A block of code that performs a specific task when it is called. They help with the organization of your code. Methods are often known as sub-programs.
Java API
Java Application Programming Interface. A collection of pre-written classes, interfaces that help programmers build applications more conveniently and efficiently.
Parameter
A parameter is a variable that is passed inside a method to pass data in the method’s heading (receives). For example: (String name, int age).
Argument
A value that is passed to a method when you call it (sends). For example: (“Sally”, 16).
Scope
The scope refers to the access range of the variable. Some variables might have a local scope (only accessible in a certain method) or global scope (accessible throughout the whole code and can be reused).
Casting
Converts a variable from one data type to another. For example: (int), (double)
Enumeration
A data type that allows a variable to hold a set of predefined constants. A list of constants that gives numbers to names.
Concatenation
Joins two or more strings to form a single string. You can use the + operator or concat() method.
Stack
A data structure that follows the LIFO (Last-In, First-Out) principle. The LIFO principle states that any element added to the stack is the first one to be removed.