You are on page 1of 1

Chapter 1 Algorithm steps to solve problem Computer- stores, receives, processes data, programbale Hardware- physical components computers

s are made of Software- programs that run on computer Operating System- programs that manage computer devices Application Software- useful programs for user (CPU)- fetch, follow instructions, and produce data (RAM)- holds info, volatile, temporary Main memory- RAM Secondary storage devices- long term no power Input devices- collects data and sends to comp Output devices- sends to outside world Syntax- rules that must be followed Program- set of intructions to perform a task High-Level Programming Language Machine Language Compiler translates source code into executable form JVM reads byte code and executes, interpreter Portability-used on many types of computers JRE- Java Runtime Environment SDK- Software development kit IDE- Integrated Development Environment Object-Oriented Programming- centered on creating objects Text Editor source code (.java) read by java compiler produces byte code (.class). interpreted by JVM program execution Chapter 2 Key words- have special meaning Reserved words- keywords Variables- storage location in memory Literals- a value that is written into the code Primitive Data Types (int, char, long, double, float, boolean, byte, short) built in Sytem.out.println and System.out.print display text output methods- a group of 1 or more programing statements Strings- series of alphanumeric characters Integer division How is = different than == compares primitive data types, equal to Operations: +=, -=, ++, -Reading Keyboard input keyboard.nextInt() Dialog Boxes- JOptionPane.showInputDialog() Chapter 3 Relational Operators (<, >, <=, >=, ==, !=) Boolean Expressions The if statement- causes one or more statements to execute only when true The if-else statement- same as above + or another group The if-else-if statement- tests a series of conditions Nested if statements- to test one or more condition, if in an if Short Circuit Evaluation Comparing String Objects- .equals Switch Statement can evalutate an integer type and make a decision based on the value Chapter 4 Increment and Decrement Operators (++, --) The While Loop, pretest, Zero or more times Infinite Loops- loop that doesnt end Pretest loops- test the value prior to executing

Posttest loops- tests the value after executing Do-While Loop, posttest, iterate at least once For Loop- pretest, counting loops Nested Loops File- a collection of data treated as a unit and stored on the computer Input- read data Output- write data, import java.io.*; open file PrintWriter output = new PrintWriter(outFile.ppm); write file, close file outputFile.close(); The Random Class import java.util.Random Random randomNumbers = new Random (); Chapter5 Void method one that performs a task then terminates Value-returning Method- not only performs a task but sends a value back to the code that called it Argument- a value that is sent into an argument Parameter- a special variable that holds the value being passed into a method Chapter 8 array initialization 1. Declare reference to an array that will hold integers, int[] numbers; 2. create a new array that will hold integers Numbers = new int [6]; array bounds checking start at 0 and continue to (array length -1) two-dimensional array, rows and columns,

You might also like