1/85
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Size
Programming languages have small vocabularies compared to natural languages.
Rigidity
In a programming language, one must get the syntax absolutely correct.
Literalness
Computers follow instructions in a very literal manner.
Vocabulary of a language
The set of words and phrases used in a programming language. An example of an item in the vocabulary of Java is 'class'.
Syntax rule in Java
A guideline that defines the structure of statements in Java. An example is the requirement that every statement must end with a semicolon.
Expression (x + y) * z
This expression means to first add the values of x and y, and then multiply the result by z.
Differences between programming languages and natural languages
Primitive data types in Java
These include numbers (both integer and floating-point), characters, and Booleans.
Objects in Java
Instances of classes that can be manipulated and sent messages.
Concatenation operator
An operator used to combine strings in Java.
Numeric data types
Data types in Java that represent numbers, including int and double.
int data type
A numeric data type in Java that uses 4 bytes of storage and has a range from -2,147,483,648 to 2,147,483,647.
double data type
A numeric data type in Java that uses 8 bytes of storage and has a range from -1.7976931348623157E+308 to 1.7976931348623157E+308.
short data type
A numeric data type in Java that uses 2 bytes for small integers.
long data type
A numeric data type in Java that uses 4 bytes for large integers.
byte data type
A numeric data type in Java that uses 1 byte for very small integers.
float data type
A numeric data type in Java that uses 4 bytes for smaller, less precise floating-point numbers.
Literals
Items in a program whose values do not change, restricted to primitive data types and strings.
Example of numeric literals
Examples include the numbers 5.0 and 9.0, and the string 'Enter degrees Fahrenheit: '.
Storage requirements for int
4 bytes.
Storage requirements for double
8 bytes.
Numeric calculations
A central part of most programs, often following the format: input numeric data, perform calculations, output numeric results.
Temperature conversion program
An example program that adheres to the format of manipulating numeric data types.
Range of int
-2,147,483,648 to 2,147,483,647.
Range of double
-1.7976931348623157E+308 to 1.7976931348623157E+308.
Java's syntax for primitive data types
Involves combining them in expressions using operators like addition and multiplication.
Java's syntax for objects
Involves sending messages to objects.
Instantiation of objects
Objects must be instantiated before use, unlike primitive data types.
Examples of numeric data types
int and double are examples of numeric data types in Java.
Numeric literal
A representation of a number in code.
Integer
A whole number without a fractional component.
Negative integer
An integer that is less than zero.
Floating-point number
A number that has a decimal point.
Exponential notation
A way to express numbers as a decimal followed by a power of 10.
Scientific notation
Another term for exponential notation.
Variable
An item whose value can change during the execution of a program.
Variable declaration statement
A statement that specifies the type of a variable before it is used.
Constant
A variable whose value cannot change after it is initialized.
Final keyword
A keyword used to declare a constant in Java.
String literal
A sequence of characters enclosed in double quotes.
Scanner object
An object used to read input from various sources, including keyboard input.
Instantiation
The process of creating an instance of a class.
Data type
A classification that specifies which type of value a variable can hold.
Double
A data type that can hold floating-point numbers with double precision.
Comment
A piece of text in the code that is ignored by the compiler.
Multiline comment
A comment that includes all text between an opening /* and a closing */.
Floating-point notation
A representation of a number that includes a decimal point.
Variable type
The specific kind of data that a variable can hold.
Variable assignment
The process of setting a variable to a specific value.
Variable name
The identifier used to reference a variable in code.
End-of-line comment
A comment that appears on the same line as a statement, typically used for brief explanations.
Run-time errors
Errors that occur when an illegal operation is attempted during program execution, such as dividing by zero.
Logic errors
Errors that occur when the program does not produce the expected outcome due to incorrect logic.
Purpose of comments
To make a program more readable and easier to maintain.
Variable declaration comments
Comments that explain the purpose of a variable when it is declared.
Major segment comments
Brief comments that explain the purpose of major segments of code.
Complex section comments
Comments that explain the workings of complex or tricky sections of code.
Self-documenting programs
Programs that are written in a way that their code structure and symbols convey meaning without needing excessive comments.
Over-commenting
Including too many comments in a program, which can become burdensome to maintain.
Under-commenting
Including too few comments in a program, making it difficult for others to understand.
Compiler error messages
Messages printed by the compiler when it detects a syntax error.
Cryptic error messages
Error messages that are difficult to understand, often encountered during compilation or execution.
Misleading comments
Comments that restate the obvious or do not add value to the understanding of the code.
Commenting best practices
Guidelines for writing effective comments that enhance code readability.
Code readability
The ease with which a programmer can read and understand code.
Maintaining comments
The process of updating comments to ensure they remain relevant and accurate as code changes.
Error types
The three types of errors in programming: syntax errors, run-time errors, and logic errors.
Compiler
A program that translates source code into byte code, detecting syntax errors in the process.
ArithmeticException
An exception thrown by the Java Virtual Machine (JVM) when an illegal arithmetic operation occurs, such as division by zero.
Case-Sensitivity
A characteristic of programming languages where identifiers are distinguished based on the use of uppercase and lowercase letters.
JVM
Java Virtual Machine, an engine that provides a runtime environment to drive Java applications.
Scanner
A class in Java used to obtain input of primitive types and strings from various sources, including user input.
Null Pointer Exception
An error that occurs when a message is sent to a variable that has not been instantiated.
No Such Method Error
A runtime error that occurs when a method is misspelled, such as 'Main' instead of 'main'.
Test Data
Data used to test a program to verify that it produces the expected output.
Infinity
A value that represents a number that falls outside the range of a double in Java.
Java Case Sensitivity
The property of Java that distinguishes between uppercase and lowercase letters, making 'Main' and 'main' different.
Arithmetic Error
An error that occurs during arithmetic operations, such as division by zero.
Desk Checking
The process of rereading code carefully after writing it to reduce logic errors.
Compile-time Error
An error that occurs when the code is compiled, preventing the program from running.
Debugging
The process of identifying and removing errors or bugs from a program.
Bug
A term used to refer to a logic error in a program.
Terminal Window
The interface where output from a program is displayed.
User Input
Data provided by the user that is processed by the program.
Debugging Statements
Code inserted into a program to help identify and locate errors during execution.
Scanner Class
A class in Java used to obtain input from the user.