Processing Data Flashcards
simple codes used in conjunction with a backslash to format program output
escape sequence
symbols used for comparing data values in order to create information out of raw data: >, <, >=, <=, ==, and !=
comparison operators
ternary operator; efficient tool used to perform if-then-else logical decisions
conditional operator
You are creating a conditional statement in a Java program. Which symbol would you use to construct the evaluation part of the statement?
colon (:)
You are creating a program to print the text “Hello World!” on paper. Why do you need to include an escape sequence?
Double quotes are used to assign string values.
What enables programmers to create a complex if-then-else decision statement using one concise line of code.
Java’s conditional
It is important to remember that the result of any calculation performed is useless to a program unless the results of your conditional operator are assigned to a
variable
How is using \” and using \b similar in a Java program?
Both are escape sequences.
Which of the following is not a valid escape sequence?
==
Which escape sequence produces a bell that make a noise if sent to an output device such as speakers?
\u0007
the prescribed order, included in the instruction set, in which the ALU processes mathematical operations
Order of Operations
the equal sign; used to place data values into variables
assignment operator
acronym depicting the mathematical Order of Operations in Java programming: parentheses, exponentiation, multiplication, division, modulus, addition, and subtraction
PEMDMAS
a group of operators that perform a calculation and an assignment at the same time
compound assignment operators
Which primitive data type is described by the range -32,768 to 32,767?
short
Which of the following operators is classified as a comparison operator?
<=
What statement denotes the difference in bytes occupied by an int and a float value in Java?
Int takes 4 bytes; float takes 4 bytes.
data type holds one letter, one number, or one symbol and occupies 1 byte
char
the equal sign (=); used in Java code to place data values into variables
assignment operator
approach to naming program elements in which words are strung together, and each new word starts with capital letter: a CamelCaseName
camel casing
the kind of data that a variable can hold; data types are primitive or reference
data type
to write code that introduces a variable into the program
declare
simple, uncomplicated data types: boolean, byte, char, double, float, int, long, and short
primitive data type
a programmer-assigned, descriptive term used to identify a Java programming variable
variable name
memory space reserved at a specific address that programmers use to store data; Java variables have descriptive names
variable
assigning a data value to a variable in Java
initializing
complex data types created from primitive data types
reference data type
What is the standard camel casing practice in naming variables in Java programming?
Start with a lowercase letter, and use uppercase letters for the first letter in a new word.
When you write code that introduces a variable into the program, you
declare
You are writing a program using the Java language. Which of the following is a requirement of Java syntax?
Each statement needs to end in a semicolon.
Which of the following is not a simple data type in the Java language?
plus
A library book sits on the shelf in the non-reserved section for everyone to check out and use. Which Java term best describes this?
global variable
Assigning a data value to a variable in a program is referred to
initializing
What is the relationship between a data type and a variable?
A variable is a placeholder, and a data type is the kind of data for a particular variable.