Final-Java Chap 1 Gaddis Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What team was started by what company in 1991?

A

Green Team started by Sun Microsystems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What did the Green Team work on?

A

A handheld controller for multiple entertainment systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What did they need next?

A

They needed a programming language that would run on various devices. Java.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What was Java first named?

A

Oak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What was demonstrated at the 1995 Sun World conference?

A

a Java enabled web browser (Hot Java)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shortly after…

A

Java incorporated into Netscape.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cross platform

A

can run on various computer operating systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Java programs can be of 2 types

A

Applications and Applets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Applications

A

stand-alone programs that run without the web. Relaxed security model since the program is run locally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

applets

A

small applications that require the use of a java enables web browser to run. Enhanced security model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

program

A

a set of instructions (algorithm) a computer follows in order to perform a task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A computer needs the algorithm to be written in

A

machine language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

machine language in written using

A

binary numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Each CPU has

A

its own machine language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

first programming language

A

assembler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Assembler was

A

processor dependent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

common concepts:

A

key words, operators, punctuation, programmer-defined identifiers, strict syntactic rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

sample program (Hello world)

A
public class HelloWorld
{
    public static void main (string[] args)
     {
          String message = "Hello World";
          System.out.println(message);
     }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

is Java case sensitive?

A

yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

key words are

A

lower case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

some examples of key words are

A

public, class, static, void

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

key words cannot be used as a

A

programmer-defined identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

semi-colons are used

A

to end Java statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

statement

A

not just a line; a complete Java instruction that causes the computer to perform an action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Data is stored…

A

in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Variable names represent…

A

a location in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

variables in Java are sometimes called

A

fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

variables are created

A

by the programmer who assigns it a programmer-defined identifier
ex: int hours=40
where hours is the variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

decides where the value will be placed in memory

A

Java Virtual Machine (JVM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

source code

A

Java programming statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

text editor

A

used to edit and save a Java source code file

32
Q

extension for source code files

A

.java

33
Q

compiler

A

a program that translates source code into an executable form

34
Q

A compiler is run by

A

using a source code file as input

35
Q

When are syntax errors discovered?

A

During compilation

36
Q

syntax errors

A

violate the rules of the programming language

37
Q

most compilers translate source code into

A

executable files containing machine code

38
Q

The Java compiler translates a Java source file into a file that contains

A

byte code instructions

39
Q

Byte code instructions

A

the machine language of the Java Virtual Machine and cannot be directly executed directly by the CPU

40
Q

byte code files end with

A

.class file extension

41
Q

the JVM is a program that

A

emulates a microprocessor

42
Q

JVM executes instructions

A

as they are read

43
Q

JVM often called

A

an interpreter

44
Q

Java is often referred to as

A

an interpreted language

45
Q

program development process

A

1) text editor saves the Java statements as source code(.java)
2) The source code is read by the Java compiler, which produces the byte code (.class)
3) The byte code is interpreted by the JVM, which results in program execution

46
Q

portable

A

a program may be written on one type of computer and then run on a wide variety of computers with little of no modification

47
Q

Java programs are highly portable because

A

Java byte code runs on the JVM and not on any particular CPU

48
Q

By providing a JVM for each platform

A

Java does not require programmers to recompile for different platforms

49
Q

JDK

A

Java Development Kit; the software used to write Java programs

50
Q

The Java compiler is a

A

command line utility

51
Q

command to compile a program

A

javac filename.java

52
Q

the Java compiler

A

javac

53
Q

procedure

A

a set of programming language statements that, together, perform a specific task

54
Q

procedures typically

A

operate on data items that are separate from the procedures

55
Q

in procedural programs

A

1) the data items are commonly passed from on procedure to another
2) procedures are developed to operate on the programs data
3) Data in the program tends to be global
4) data formats might change and thus the procedures that operate on that data must change

56
Q

object-oriented programming

A

centered on creating objects rather than procedures

57
Q

objects are

A

a melding of data and procedures that manipulate data

58
Q

attributes

A

data in an object

59
Q

methods

A

procedures in an object

60
Q

data hiding is a part of what type of programming?

A

object-oriented

61
Q

Why is data hiding important?

A

1) protects attributes from accidental corruption by outside objects
2) hides the details of how an object works to help programmer concentrate on using it
3) allows object to be modified without breaking code

62
Q

Code reusability is encouraged by

A

object-oriented programming

63
Q

component

A

a software object that contains data and methods that represent a specific concept of service

64
Q

Are components stand-alone programs?

A

Not typically

65
Q

Components can be used by

A

programs that need the component’s service

66
Q

reuse of code promotes

A

the rapid development of larger software projects

67
Q

components =

A

objects

68
Q

the programmer determines the attributes and methods needed, and then creates a

A

class

69
Q

class

A

a collection of programming statements that define the required object;
a “blueprint” that objects may be created from

70
Q

an object is the

A

realization (instantiation) of a class in memory

71
Q

Are classes limited in how many objects they can instantiate?

A

no.

72
Q

instance of the class

A

each object that is created from a class

73
Q

a program is simply

A

a collection of objects that interact with each other to accomplish a goal

74
Q

inheritance

A

the ability of one class to extend the capabilities of another

75
Q

example of inheritance

A

The class Car is a specialized form of the Vehicle class. So, the Vehicle class is the base (parent) class and Car is the derived (child) class.