• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/51

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

51 Cards in this Set

  • Front
  • Back
What is an operating system used for?
It manages resources (hardware)
It provides a user interface
It runs software
What line starts a program?
public class . . . followed by the class name, I.e. HelloWorld
What is the second line of a program?
Defines the program as public or private
Looks like
public static void main (Strings[] args) {
What is the command to print editor defined text and then add a line after the text?
System.out.println("");
What is an inline comment?
A comment that occupies no more than one line, started with two forward slashes //
How do you create a multi line comment?
Start with /* and end with */
How does the computer know where the class/program starts?
The program always starts with the class definition, which is followed by the squiggly brackets { and is ended by the opposite bracket }
What does System tell the computer?
This defines the library
What does compiling do?
This converts the written code into binary and checks for syntax errors
What is the difference between println(), print(), and print(\n)?
The first inserts a new line after the defined text
The second continues writing on the same line after the defined text
The third starts a new line and then writes the text
What does \n do?
Tells the computer to start a new line
What does \t do?
Outputs a tab
What does \" do?
Outputs a double quotation
What does \' do?
Outputs a single quotation
What does \\ do?
Outputs a backslash
What does \r do?
Advances the cursor to the beginning of the line
What does \b do?
Outputs a backspace
What are the escape characters?
\n
\t
\"
\'
\\
\r
\b
What does { . . . } mean?
Denotes a block of code
What does [ . . . ] mean?
This denotes an array
What does a set of quotation marks signify?
Anything within the quotation marks is called a string
What does a semicolon mean?
It marks the end of a statement
What is a bit?
A binary digit, either one or two
What is a byte?
This is a group of bits, typically eight bits
How do you read decimal numbers in the base conversion system?
How do you convert from binary to decimal?
Here's another binary to decimal example
What is the hexadecimal system?
This is another number/character system where the base is 16. The characters are as follows
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F
How do you convert from hexadecimal to decimal?
What is the octal system?
A number system with the base 8
How do you convert from decimal to binary?
First start with the decimal number, for example 26
Then you divide by 2
Take your answer, it will have a remainder of 1 or 0
The remainder become the RIGHT most digit
Rinse and repeat until your quotient/answer becomes either 1 or 0
Here's an example of decimal to binary conversion
How many unique patterns are created from N bits?
Whatever number N equals, take 2 to the power N
What is the difference between a number and a character?
A number has magnitude, a value that can be computed, whereas a character is just a symbol

Characters are written with single quotation marks in code, i.e. '6'

For example the number 6 in 7 bit binary is 000110
whereas the character 6 in 7 bit binary is 0110110
How do you represent a string of characters in bits?
Each character is converted into the system of your choosing (binary, octal, hex, etc.)
What are identifiers?
Identifiers are elements of a program that describe different elements. Identifiers are not strings that are converted, they are simply the names of different elements and variables used by the programmer and subsequently the program
What are the rules of identifiers?
1) Can be a combination of alphabets, digits, underscores, and dollar signs
2) Can be of any length
3) The first character may not be a digit
4) Spaces are not allowed
5) Identifiers cannot be keywords defined by the coding language, i.e. true, false, null
6) For professor Konagi, identifiers must start the second word with a capital letter i.e. averageAge
What are some Java keywords?
double
class
void
char
null
private
for
true
if
public
while
int
What are variables?
They are a place or places in the system memory. Variables can be pre defined or they can be computed during run time
A variable must be declared before use, which means that you need to tell the program what type of 'thing' the variable is, i.e. an int, double, String, etc.
What is a byte variable?
This is used to identify small integers, which can be negative
What is an int variable?
Regular integers, which can be negative
What is a long variable?
This is used when you have large integers, which can be signed
What is a float variable?
This is a large REAL number, which can be signed
What is a short variable?
This is a signed small integer, which is larger than a byte
What is a double variable?
This is a very large signed real number
What is a predefined integer?
This is a variable that is used by the program. it starts with a data type (float, double, int, etc.) and is followed by an identifier
What is a string?
A string is a series of text characters, i.e. "Programing 1"

A string starts with a declaration followed by a variable

String courseName = "Programming 1"

Double quotes are required, and String is always capitalized
What is a boolean variable?
This is a variable that is either true or false, it is not a value
How would you make a variable constant for an entire program?
Use the type final

i.e. final int SPEED = 70;

As you can see it is an "add on" type which goes before the variable type
So after you've defined the variable with a type, how can you assigned another value to that variable?
Use an assignment statement, which can be compiled, or imputed and computed during run time
How can you get the program to perform basic arithmetic?
* = multiplication
/ = division
% = remainder
+ = addition
- = subtraction