1/40
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
what is the relationship between bytes?
1024
what is RAM?
a volatile form of storage that contains data and programs that are being used
what are storage devices?
a permanent form of storage
why is RAM important for programming?
it runs heavy integrated development environments, stores code and its variables, and multitasks
what is a program?
a specific set of ordered operations for a computer to perform
what is a machine language?
a computer’s native language, in the form of binary code
what is an assembly language?
uses a short descriptive word to represent each of the machine language instructions
what is a high-level language?
a platform independent, english-like, easy to learn and use program
why java?
it’s a poerful and general-purpose programming language
what are some important characteristics of java?
it’s object-oriented, portable, and interpreted
what is an integrated development environment?
a software application providing facilities for developing programs
what is an application programming interface? (API)
contains predefined classes and interfaces for developing programs
what is a class?
a building block in object-oriented programming
what is a method?
a block of code including a collection of statements to perform an operation
what are some java syntax rules?
every statement ends with “;”
what is a syntax error?
not following the rules of a programming language
what are some runtime errors?
causes the program to terminate abnormally
what are some logic errors?
program not working as intented
what is % in java?
the remainder
what is the order of precedence in java?
follows PEMDAS
what is a variable?
used to store values to be used later in a program
how do you import a scanner?
import java.util.Scanner;
Scanner input = new Scanner(System.in);
what is a boolean data type?
evaluates true or false — compares two values
what does the not (!) operator do?
reverses the value of the logical expression
what is the and operator represented by?
&&
what is the or operator represented by?
||
what does he min method return?
the minimum number of two numbers
what does the max method return?
the maximum number of two numbers
what does the abs method return?
the absolute value of the number
what does the random method return?
a random double value greater than or equal to 0 and less than 1
how do you use the random method?
a + Math.random() * b
why do we use repetition?
it helps us deal with the unknown, allows us to efficiently use variables, can input, add, and average multiple numbers using a limited value of variables
how do you write a while statement?
while (expression) {
//Loop body
statement(s);
}
what is an infinite loop?
continues to execute endlessly
what is a counter-controlled loop?
you know how many times the loop should execute
what is a sentinel-controlled loop?
you don’t know how many time the loop will execute, but you know the last value
what is a flag-controlled loop?
a boolean variable controls the loop
how do you write a for statement?
for (initial statement; loop condition; update statement) {
//Loop body
statement(s);
}
what are the for loop control statements?
initial statement, loop condition, and update statement
what is a nested control structure?
using a control structure within a control structure
what is a break in a loop?
immediate termination of the loop