Java Chapter 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

bit

A binary digit, a 0 or a 1.

line comment

Comments preceded by two slashes (//).

block comment

Enclosed between /* and */ on one or several lines in the source code.

console

Refers to the input and output device of a computer.

library

Same as Application Program Interface; a set of classes and interfaces that can be used to develop Java programs.

source program

Same as source code. A program in a high-level language before being compiled.

interpreter

Software for interpreting and running Java bytecode.

Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space and your first name.

System.out.print("Turing, Alan"); System.out.println();

Write a statement that prints "Hello, world" to the screen.

System.out.println("Hello, world");

dot pitch

The amount of space between pixels. The smaller the dot pitch, the better the display.

javac command

The command to invoke the compiler to compile a Java source code program from the command line.

java command

The command to invoke the interpreter to run a Java program from the command line.

storage devices

The permanent storage for data and programs. Memory is volatile, because information is lost when the power is off. Program and data are stored on secondary storage and moved to memory when the computer actually uses them.

pixels

Tiny dots that form an image on the screen.

cable modem

Uses the TV cable line maintained by the cable company. A cable modem is as fast as a DSL.

memory

Stores data and program instructions for CPU to execute.

hardware

The physical aspect of the computer that can be seen.

programming

The process of writing a program.

statement terminator

The semicolon is the statement terminator symbol in Java.

modem

A device that allows computers to communicate over telephone lines at speeds up to 56,000 bps (bits per second)

network interface card (nic)

A device to connect a computer to a local area network (LAN). The LAN is commonly used in business, universities, and government organizations. A typical type of NIC, called 10BaseT, can transfer data at 10 Mbps.

assembly language

A low-level programming language in which a mnemonic is used to represent each of the machine language instructions.

java virtual machine

A machine that runs Java bytecode. It is called virtual because it is usually implemented in software rather than in hardware.

bytecode verifier

A program in the JVM that checks the validity of the bytecode and ensures that the bytecode does not violate Java's security restrictions.

operating system (os)

A program that manages and controls a computer's activities (e.g., Windows, Linux, Solaris).

assembler

A program that translates an assembly-language program into machine code.

high-level language

A programming language that is designed to be easy for humans to read and write.

block

A sequence of statements enclosed in braces ({}).

application program interface (api)

A set of classes and interfaces that can be used to develop Java programs.

encoding scheme

A set of rules that govern how a computer translates characters into data the computer can actually work with.

central processing unit (cpu)

A small silicon semiconductor chip with millions of transistors that executes instructions.

compiler

A software program that translates source code (e.g., Java source code) into a machine language program.

bus

A system that connects all the components of the computers together.

statement

A unit of code that represents an action or a sequence of actions.

byte

A unit of storage. Each byte consists of 8 bits. The size of the hard disk and memory is measured in bytes. A megabyte is roughly a million bytes.

keyword (or reserved word)

A word defined as part of Java language, which has a specific meaning to the compiler and cannot be used for other purposes in the program.

runtime error

An error that does not occur until the program has started to execute but that prevents the program from continuing.

Comment

Comments document what a program is and how it is constructed. They are not programming statements and are ignored by the compiler. In Java, comments are preceded by two slashes (//) in a line or enclosed between /* and */ in multiple lines.

java development toolkit (jdk)

Defines the Java API and contains a set of command-line utilities, such as javac (compiler) and java (interpreter). With Java 2, Sun renamed JDK 1.5 to Java 2 SDK v. 1.5. SDK stands for Software Development Toolkit.

Programming Exercise 1.1 (Display three messages) Write a program that displays: Welcome to Java Welcome to Computer Science Programming is fun Class Name: Exercise01_01

public class Exercise01_01 { public static void main(String[] args) { System.out.println("Welcome to Java"); System.out.println("Welcome to Computer Science"); System.out.println("Programming is fun"); } }

main method

public static void main(String[] args) The starting method for executing a program.

Write a complete main method that prints "Hello, world" to the screen.

public static void main(String[] s) { System.out.print("Hello, world"); System.out.println(); }

low-level language

Refers to assembly language; a mnemonic is used to represent each of the machine language instructions.

software

Same as a program. The invisible instructions that control the hardware and make it work.

program

Same as software. The invisible instructions that control the hardware and make it work.

source code

Same as source program. A program in a high-level language before being compiled.

integrated development environment (ide)

Software that helps programmers write code efficiently. IDE tools integrate editing, compiling, building, debugging, and online help in one graphical user interface.

screen resolution

Specifies the number of pixels per square inch. The higher the resolution, the sharper and clearer the image is.

bytecode

The result of compiling Java source code. Bytecode is machine-independent and can run on any machine that has a Java running environment.

digital subscriber line (dsl)

Uses a phone line and can transfer data in a speed 20 times faster than a regular modem.

class loader

When executing a Java program, the JVM first loads the bytecode of the class to memory using a program called the class loader. If your program uses other classes, the class loader dynamically loads them just before they are needed.

syntax error

a character or string incorrectly placed in a command or instruction that causes a failure in execution by the compiler.

logic error

(//). Occurs when a program does not perform the way it was intended to.

motherboard

Is a circuit case that connects all of the parts of a computer together.

machine language

Is a set of primitive instructions built into every computer. The instructions are in the form of binary code, so you have to enter binary codes for various instructions.


Set pelajaran terkait

Chapter 46 - Nursing Care of the Child With an Alteration in Cellular Regulation

View Set

4. Project Integration Management

View Set

Male Reproductive System Science Test (Study this one)

View Set

Psych 101: Thinking and Problem Solving

View Set

HLTH405-S5A-202120 Nutrition for Fitness & Sports ~ Module 1-4

View Set

APUSH CHAP 9 + 10 AP CLASSROOM ANSWERS

View Set