Unit 1: Primitive Types Flashcards
(int)
A data type in programming that represents whole numbers without decimal points. It stands for “integer” and can be used to store positive, negative, or zero values.
*= operator
A shorthand notation used in programming to multiply and assign a value to a variable. It multiplies the current value of the variable by another value and stores the result back into the same variable.
Access Modifiers
Keywords in programming that determine the accessibility of classes, methods, and variables. They control whether other parts of the program can access and use these elements.
AP CSA
Stands for Advanced Placement Computer Science A. It is an advanced level course offered in high schools that focuses on teaching students the fundamentals of computer science and programming.
Arithmetic Operators
Symbols used in programming to perform mathematical operations on numerical values. They include addition, subtraction, multiplication, division, and modulus.
Array of chars
A data structure that stores a sequence of characters. It is often used to represent strings in programming.
Assignment operator
Used to assign a value to a variable. It is represented by the equals sign (=) and it assigns the value on the right side of the equals sign to the variable on the left side.
Binary Code
A coding system that uses only two digits, 0 and 1, to represent information. It is the fundamental language of computers.
BlueJ
An integrated development environment (IDE) primarily used for teaching introductory Java programming. It provides a simplified interface and visual tools to help beginners understand object-oriented concepts.
boolean
A data type that can only have two possible values - true or false. It is often used in programming to make decisions and control the flow of a program.
Camel Casing
A naming convention where each word in a compound identifier is capitalized except for the first word, which starts with a lowercase letter. It is commonly used in programming languages to make variable and function names more readable.
Classes
User-defined data types in object-oriented programming. They serve as blueprints for creating objects by defining their attributes and methods.
Code Tracing
The process of manually following the execution of a program to understand how it works and identify any errors or bugs. It involves stepping through each line of code, keeping track of variable values and function calls.
Compound Assignment Operators
Shorthand notations that combine an arithmetic operation with the assignment operator. They allow you to perform an operation and assign the result to a variable in a single step.
Data Type Declaration
Specifies the type of data that a variable can hold in a programming language. It defines what kind of values can be stored and how those values can be manipulated.
Decrement Operator (–)
Used to decrease the value of a variable by 1. It subtracts 1 from the current value of the variable.
Decrementing
Refers to the process of decreasing a value by a certain amount. It is commonly used in programming to subtract a specific number from a variable.
Division Symbol (/)
Used in programming to perform the mathematical operation of division between two numbers. It takes a dividend (the number being divided) and a divisor (the number dividing the dividend), and returns the quotient (the result of division).
Double
In Java, is both a wrapper class for primitive type double and also represents real numbers with decimal points. It provides useful methods for performing mathematical operations on these numbers.
Double
In Java, it is both a wrapper class for primitive type double and also represents real numbers with decimal points. It provides useful methods for performing mathematical operations on these numbers.
final keyword (in context of constants)
Used to declare a constant variable in Java, meaning its value cannot be changed once assigned. It is often used to define values that should not be modified throughout the program.
Final Modifier
Used in programming languages to indicate that a variable cannot be changed once it has been assigned a value or that a method cannot be overridden by subclasses.
High-level programming languages
Languages that are designed to be easily understood by humans. They use natural language elements and abstract away low-level details, making it easier for programmers to write code.
Increment Operator (++)
Used to increase the value of a variable by 1. It adds 1 to the current value of the variable.
InputMismatchException
An exception that occurs when the input provided by the user does not match the expected data type or format. It is commonly thrown by methods in the Scanner class when trying to read a value of one type but encountering a different type.
int
A primitive data type in Java used to store whole numbers without decimal points. It has a fixed size and represents integer values within a specific range.
Integer.MAX_VALUE
Refers to the maximum possible integer that can be stored in Java’s int data type. It is a constant value equal to 2^31 - 1.
Integer.MIN_VALUE
A constant in Java that represents the smallest possible value for an integer. It is equal to -2^31.
IntelliJ
An integrated development environment (IDE) specifically designed for Java programming. It provides a user-friendly interface and a wide range of features to help developers write, debug, and test their code efficiently.
Java Virtual Machine (JVM)
A virtual machine that executes Java bytecode. It provides the runtime environment for running Java applications and translates bytecode into machine code that can be executed by the computer’s operating system.
Java
A high-level, object-oriented programming language that is widely used for developing applications and software. It is known for its platform independence, meaning that programs written in Java can run on any device or operating system with a Java Virtual Machine (JVM).
Machine code
The lowest level of instructions that can be executed directly by a computer’s hardware. It consists of binary digits (0s and 1s) representing specific operations performed by the processor.
Method
A named sequence of instructions that can be called or invoked to perform a specific task or action. Methods are used for code reusability, organization, and abstraction.
Methods
Functions defined within a class that perform specific tasks or actions when called upon by an object. They can manipulate data, interact with other objects, or return values.
Modulo Operator (%)
Used in programming to find the remainder when one number is divided by another. It takes a dividend and a divisor, and returns the remainder after performing division.
Modulo Operator
Represented by the symbol %, returns the remainder of a division operation. It is used to determine if a number is divisible by another number.
Multiplication Symbol (*)
Used in programming to perform the mathematical operation of multiplication between two numbers. It takes two operands, one on each side, and returns their product.
nextBoolean()
A method used in Java to read the next boolean value from the input source. It retrieves and returns the next boolean token as a boolean data type (either true or false).
nextDouble()
A method used in Java to read the next floating-point (decimal) value from the input source. It retrieves and returns the next double token as a double data type.
nextInt()
A method used in Java to read the next integer value from the input source. It retrieves and returns the next integer token as an int data type.
Object
An instance of a class that represents a specific entity or thing in a program. It contains both data (attributes) and behavior (methods).
Objects
Instances of a class that represent real-world entities or concepts. They encapsulate data (attributes) and behavior (methods) into a single entity.
Order of Operations
The order in which mathematical operations should be performed to obtain the correct result. It follows the acronym PEMDAS, which stands for Parentheses, Exponents, Multiplication and Division (from left to right), and Addition and Subtraction (from left to right).
Overflow
Occurs when a calculation exceeds the maximum value that can be represented by a given data type. This can result in unexpected behavior or errors in programs.
Post-increment
An operator that increases the value of a variable after using it in an expression. It returns the original value and then adds one unit to it.
Pre-increment
An operator that increases the value of a variable before using it in an expression. It adds one unit to the original value and then returns the updated result.
Primitive data type
Basic data types provided by programming languages, such as integers, floating-point numbers, booleans, and characters. They represent simple values and have predefined characteristics.
Primitive data types
Basic data types that are built into a programming language and represent simple values. They include integers, floating-point numbers, characters, booleans, and more.
Protected Access
A level of access control in object-oriented programming that allows members (variables and methods) to be accessed within the same class, subclasses, and classes in the same package.
Reference Data Types
Data types that store references or memory addresses of objects rather than the actual values. They point to the location in memory where the object is stored.
repl.it
An online coding platform that allows users to write, run, and debug code in various programming languages directly from their web browser.
Scanner class
A built-in Java class that allows users to read input from various sources, such as the keyboard or a file.
String class
A built-in class in Java that represents a sequence of characters. It provides various methods to manipulate and work with strings.
String
A sequence of characters in Java, enclosed in double quotes. It represents text and can be manipulated using various methods.
Syntax Error
A mistake in the structure or format of a program’s code that prevents it from being compiled or executed properly. It occurs when the code violates the rules and grammar of the programming language.
System.out.print()
A method in Java that allows you to display text or values on the console. It does not add a new line after printing.
System.out.println
A Java statement used to display output on the console. It prints the specified message or value and adds a new line character at the end.
Variable Declaration
Refers to the process of creating variables by specifying their names and types before they are used in programming. It reserves memory space for storing values associated with those variables.
Variable Initialization
The process of assigning an initial value to a variable when it is declared. It ensures that the variable has a valid starting value before it is used in the program.
Visual Studio Code
A lightweight yet powerful source code editor developed by Microsoft. It supports multiple programming languages and offers various extensions to enhance productivity during coding.
Void
A keyword used in method declarations to indicate that the method does not return any value. It is used when a method performs an action but does not produce a result.