The location in memory that a byte resides at is called
address
When speaking about computer systems, how many categories of memory are there?:
2, main and auxiliary
Blank are tangible components of a computer
hardware and software
Blank is the program that’s purpose is to manage computer hardware and execute other programs
Application program
Which type of language is typically the input to a compiler?
High level language
Every statement in java ends with
semicolon ;
What is an error in a program called?
bug
What is eliminating errors called?
debugging
What are the 3 kinds of errors?
syntax, runtime, logic
What is a syntax error
grammatical error
What is a runtime error
Errors that are detected when your program is \n running, but not during compilation
Example of a runtime error
attempting to divide by 0
What is a logic error
Errors that are not detected during compilation or \n while running, but which cause the program to \n produce incorrect results
What is an algorithim
a set of instructions for solving a \n problem.
What is an inheritance for in java?
Used to organize classes, A class at lower levels inherits all the \n characteristics of classes above it in the hierarchy
What are actions?
methods
What do objects that have the same type and same kind belong to
same class
What can objects perform
actions
When a Java program is compiled, the byte-code \n version of the program has the same name, but the \n ending is changed to what?
.java → .class
How do you print something on the screen?
System.out.println (““)
What is a variable?
something that can store data
What is a statement;
An instruction to the computer, ends in semicolon
What is a package
a library of classes that have been \n defined already
import java.util.Scanner;
What are two kinds of java programs
applications and \n applets
What is an interpreter
A program that translates each byte-code \n instruction, executing the resulting machine-language \n instructions on the particular computer before translating the \n next byte-code instruction.
What does a Java compiler translate a java program into?
byte code
What is byte code?
the machine language for a hypothetical computer (or \n interpreter) called the Java Virtual Machine
What is a operating system?
a supervisory program that \n oversees the operation of the computer
What input does a computer receive
program and data needed by program
What is a program
a set of instructions for a computer to \n follow
What do variables store?
Numbers and letters
Data stored by the variable is called
Its value
When you declare a variable you provide its
name and type
int numberOfBaskets,eggsPerBasket;
What does a variables type determine
what kinds of values it \n can hold (int, double, char, etc.)
Variable must be declared before it can be used
What is an identifier
a name, such as the name of a \n variable
may contain only \n • Letters \n • Digits (0 through 9) \n • The underscore character (_) \n • And the dollar sign symbol ($) which has a special \n meaning
What is uninitialized?
A variable that has been declared, but not yet given \n a value
What code is needed for a keyboard to be able to input?
Scanner keyboard = new Scanner(System.in);
What can parantheses do?
can communicate the order in which \n arithmetic operations are performed \n •examples: \n (cost + tax) * discount \n (cost + (tax * discount)
What code is at the beginning of code for a keyboard scanner?
import java.util.Scanner;
How can you write a comment
/
/***
/**
What does a loop statement do
repeats an action until a stopping \n condition occurs
What is an if-else statement
A branching statement that chooses between two \n possible actions
if (Boolean_Expression) \n Statement_1 \n else \n Statement_2
The value of a boolean expression is
either true \n or false
\n •Examplestime < limit \n balance <= 0
Multi branch if else statement
if (score >= 90) \n grade = 'A'; \n else if ((score >= 80) && (score < 90)) \n grade = 'B'; \n else if ((score >= 70) && (score < 80)) \n grade = 'C'; \n else if ((score >= 60) && (score < 70)) \n grade = 'D'; \n else \n grade = 'F';
How can a program be terminated
System.exit(0)
What is a switch statement
a mutltiway branch that \n makes a decision based on an integral (integer or \n character) expression
switch (Controlling_Expression) \n { \n case Case_Label: \n Statement(s); \n break; \n case Case_Label: \n ... \n default: \n ... \n }
Which are valid boolean expressions?
&&
<=
||