Final-Java Chap 1 Gaddis Flashcards

(75 cards)

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
Data is stored...
in memory
26
Variable names represent...
a location in memory
27
variables in Java are sometimes called
fields
28
variables are created
by the programmer who assigns it a programmer-defined identifier ex: int hours=40 where hours is the variable
29
decides where the value will be placed in memory
Java Virtual Machine (JVM)
30
source code
Java programming statements
31
text editor
used to edit and save a Java source code file
32
extension for source code files
.java
33
compiler
a program that translates source code into an executable form
34
A compiler is run by
using a source code file as input
35
When are syntax errors discovered?
During compilation
36
syntax errors
violate the rules of the programming language
37
most compilers translate source code into
executable files containing machine code
38
The Java compiler translates a Java source file into a file that contains
byte code instructions
39
Byte code instructions
the machine language of the Java Virtual Machine and cannot be directly executed directly by the CPU
40
byte code files end with
.class file extension
41
the JVM is a program that
emulates a microprocessor
42
JVM executes instructions
as they are read
43
JVM often called
an interpreter
44
Java is often referred to as
an interpreted language
45
program development process
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
portable
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
Java programs are highly portable because
Java byte code runs on the JVM and not on any particular CPU
48
By providing a JVM for each platform
Java does not require programmers to recompile for different platforms
49
JDK
Java Development Kit; the software used to write Java programs
50
The Java compiler is a
command line utility
51
command to compile a program
javac filename.java
52
the Java compiler
javac
53
procedure
a set of programming language statements that, together, perform a specific task
54
procedures typically
operate on data items that are separate from the procedures
55
in procedural programs
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
object-oriented programming
centered on creating objects rather than procedures
57
objects are
a melding of data and procedures that manipulate data
58
attributes
data in an object
59
methods
procedures in an object
60
data hiding is a part of what type of programming?
object-oriented
61
Why is data hiding important?
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
Code reusability is encouraged by
object-oriented programming
63
component
a software object that contains data and methods that represent a specific concept of service
64
Are components stand-alone programs?
Not typically
65
Components can be used by
programs that need the component's service
66
reuse of code promotes
the rapid development of larger software projects
67
components =
objects
68
the programmer determines the attributes and methods needed, and then creates a
class
69
class
a collection of programming statements that define the required object; a "blueprint" that objects may be created from
70
an object is the
realization (instantiation) of a class in memory
71
Are classes limited in how many objects they can instantiate?
no.
72
instance of the class
each object that is created from a class
73
a program is simply
a collection of objects that interact with each other to accomplish a goal
74
inheritance
the ability of one class to extend the capabilities of another
75
example of inheritance
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.