Chapter 1. Flashcards

1
Q

what’s another name for a program?

A

Another name for a program (or part of a program) is code.

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

what are the two important qualities about a programmer?

A

They know how to break big problems into smaller, step-by-step procedures & they can express these steps in a very precise language.

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

what is a language called that involves writing steps?

A

A language for writing steps is called a programming language.

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

how many programming languages besides Java?

A

Java is just one of several thousand useful programming languages.

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

how is it different and similar between different programming languages?

A

Computer languages can be very different from one another, but in some ways, they’re all the same.

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

how would you explain the similarity of one language to another?

A

It’s just a mental substitution of one set of symbols for another.

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

how do programmers learn so many languages seemingly so easily?

A

Eventually, writing in different languages becomes second nature as they are the same just written differently. it’s just a mental substitution of a set of symbols for another.

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

what process happens when you create a new computer program?

A

When you create a new computer program, you go through a multistep process. First you create source code which gets interpreted by the compiler which turns into bytecode which is interpreted by the jvm which gets converted into ones and zeros and then the computer interprets those 1s and 0s to run the program.

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

what is a compiler?

A

Compiler: A compiler translates your source code into byte code

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

what is a virtual machine?

A

the virtual machine (jvm) interprets the bytecode and converts it into machine code 1s & 0s for the computer to understand

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

what is an API?

A

Application programming interface: An application programming interface contains useful prewritten code.

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

what tools are involved in the multi step process for creating a computer program?

A

The process involves three important tools: compiler, virtual machine, and an API

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

how do computer circuits interact with letters of the alphabet to create words?

A

computer circuits don’t deal directly with letters of the alphabet. When you see the word Start on your computer screen, the computer stores the word internally as a collection of 1s and 0s

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

what is the correct way to understand a 5 letter word on your computer?

A

seeing a friendly looking five-letter word is your interpretation of the computer screen’s pixels, and nothing more.

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

how does a computer’s complicated codes of 1s and 0s become understable to humans?

A

Computers break everything down into very low-level, unfriendly sequences of zeros and ones and then put things back together so that humans can deal with the results.

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

how do you get the computer to understand your written code?

A

the program has to be interpreted and converted into zeros and ones.

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

what is the name of the process which translates a programmers written code to be understood by the computer?

A

The official name for the translation process is compilation.

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

if you wrote code without compilation and ran the code, what is the result?

A

Without compilation, the computer can’t run your program.

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

what is the name of the codes of the challenging mess of 1s & 0s ?

A

The compiled mumbo jumbo of 1s & 0s goes by many different names: Most Java programmers call it machine code

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

what is bytcode often called and why?

A

It’s often called a .class file. That’s because, in Java, the bytecode gets stored in files named SomethingOrOther.class

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

what are the names and the differences between a programmer’s written code and the 1s & 0s the computer translates

A

To emphasize the difference, Java programmers call the part they write for code, the source code and refer to the zeros and ones that are converted by the jvm from the bytecode ,machine code.

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

how can a programmer create bytecode?

A

a process of a tool called the compiler is used to interpret and convert your written code which is source code into bytecode

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

what is the name of the tool used to convert source code into bytecode?

A

To create bytecode, the computer uses a special software tool called a compiler

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

what type of code is compiled to create another type of code & what type of code is the result once it is compiled?

A

The computer compiles source code to create bytecode.

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

what is the name of the file which contains a special software tool used for converting source code into object code?

A

Your computer’s hard drive may have a file named javac or javac.exe. This file contains that special software tool — the compiler.

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

what does the word javac stand for?

A

The word javac stands for Java compiler

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

what type of file is used when running instructions to create bytecode?

A

new object code is created by going behind the scenes and running the instructions in the javac file.

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

what is usually mistaken as the relationship between bytecode and source code?

A

a bytecode file is not a cryptogram substituting 1s & 0s in keywords like “if” & “else”, it’s the encoding of a program’s logic.

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

what do 1s & 0s describe to your computer?

A

the 1s & 0s describe the flow of data from one part of your computer to another.

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

what is the purpose for your computer reading 1s & 0s?

A

your computer reads a bunch of zeros and ones to decide what to do next.

31
Q

what is the difference between source code and machine code?

A

your source code describes an overall strategy — a big picture. The compiled bytecode turns the overall strategy into hundreds of tiny, step-by-step details that are understood by the computer as 1s and 0s.

32
Q

what happens to bytecode when you run your program?

A

When you run your program the byte code is interpreted and converted into ones and zeros by the jvm so that the computer can understand the bytcode

33
Q

if you dont have the ability to make sense of 1s & 0s, then what does and what is the process that makes sense of the 1s & 0s?

A

The thing that can make sense of ones and zeros is the computer obviously and the process which allows the computer to understand the ones and zeros starts with the programmers written code which is the source code and then the source code is interpreted and converted into bytecode by the compiler which then the bytecode is interpreted and converted by the jvm into ones and zeros that which the computer understands

34
Q

what does the computer do in response to bytecode?

A

The computer activates the jvm in response to bytecode

35
Q

what software is used to translate bytecode by the computer?

A

There’s a special piece of software that carries out the instructions in the bytecode That special piece of software is called the Java Virtual Machine (JVM).

36
Q

when you run a program, what is the computer really running?

A

When you run a Java program, your computer is really running the JVM.

37
Q

what is the basic understanding of what the JVM is used for?

A

The basic understanding of what the jvm is used for is for interpreting and converting bytecode into ones and zeros that which the computer understands

38
Q

what does the JVM act like in between the bytecode and the computer?

A

The jvm acts like an interpreter and a converter for the bytecode and it changes the bytecode into ones and zeros that which the computer understands

39
Q

how long did it take Java to become popular?

A

When Java first hit the tech scene in 1995, the language became popular almost immediately.

40
Q

for what reason was Java popular for?

A

what made Java popular back in the day, was because of the JVM.

41
Q

what is so special about the JVM compared to other programming languages that don’t have a JVM?

A

The JVM is like a foreign language interpreter, turning Java bytecode into whatever native language a particular computer understands and this is what makes Java so special.

42
Q

what would you need if you didnt have a virtual machine?

A

Without a virtual machine, you need a different kind of object code for each operating system.

43
Q

what is the most versatile feature about the JVM?

A

The most versatile feature about the jvm is its portability which allows Java code to be understood in many different languages with a compatible virtual machine

44
Q

what is the most convenient feature about Java and what is it called?

A

The most convenient feature about Java is it’s right once run anywhere or on many devices feature which is called portability.

45
Q

what makes Java so valuable when it comes to different kinds of devices?

A

What makes Java so valuable is it’s ability to translate code into many other computer languages with compatible virtual machines which gives it its high portability

46
Q

what happened in the late 80s and early 90s that made Java more advanced than other languages?

A

The late 1980s saw several advances in software development, and by the early 1990s, many large programming projects were being written from prefab components.

47
Q

what happened in 1995 that gave Java an advantage over other languages?

A

when java came along in 1995, they created a library of reusable code that then had about 250 programs.

48
Q

what were 3 things that the 250 programs of reusable code from a library that Java created used for?

A

the 250 programs of reusable code from a library that Java created, was code for dealing with disk files, code for creating windows, and code for passing information over the Internet.

49
Q

how much did the library of reusable progams increase from 250 programs?

A

Since 1995, this library has grown to include more than 4,000 programs.

50
Q

what is java’s library of reusable programs called?

A

java’s library of reusable programs is called the Application Programming Interface (API).

51
Q

when you write code even the simplest program, what is always being accessed?

A

Every Java program, even the simplest one, calls on code in the Java API.

52
Q

how is the java api both useful and formidable?

A

This Java API is both useful and formidable. It’s useful because of all the things you can do with the API’s programs. It’s formidable because the API is extensive.

53
Q

how many programs should you memorize in the java API?

A

No one memorizes all the features made available by the Java API. Programmers remember the features that they use often and look up the features that they need in a pinch.

54
Q

what explains or instructs the programmer on how programs in the API work?

A

programmers look up these features in an online document called the API Specification (known affectionately to most Java programmers as the API documentation, or the Javadocs).

55
Q

where can you find the Javadocs?

A

you can find the API documentation at http://docs.oracle.com/javase/8/docs/api

56
Q

what is the difference from the Java API compared to the javadocs?

A

The API documentation describes the thousands of features in the Java API

57
Q

how often are you to look over and depend on the javadocs?

A

As a Java programmer, you consult this API documentation on a daily basis.

58
Q

what are two ways to access the javadocs?

A

You can bookmark the documentation at the Oracle website and revisit the site whenever you need to look up something, or you can save time by downloading your own copy of the API docs using the links found at www.oracle.com/technetwork/java/javase/downloads/index.html.

59
Q

what tools are needed to create java programs?

A

to write Java programs, you need certain tools: You need a Java compiler. You need a JVM. You need the Java API. You need access to the Java API documentation. You need an editor to compose your Java programs. When you come right down to it, a computer program is a big bunch of text. you need an editor — a tool for creating text documents.

60
Q

how is microsoft word and an editor similar and different?

A

An editor is a lot like Microsoft Word, or like any other word processing program. The big difference is that an editor adds no formatting to your text — no bold, italic, or distinctions among fonts. Computer programs have no formatting whatsoever. They have nothing except plain old letters, numbers, and other familiar keyboard characters.

61
Q

what is the difference between the color highlighting in the program in your editor compared to formatting?

A

When you edit a program in the editor of an IDE, you may see bold text, italic text, and text in several colors. But your program contains none of this formatting. If you see stuff that looks like formatting, it’s because the editor that you’re using does syntax highlighting.

62
Q

what is the purpose for syntax highlighting?

A

With syntax highlighting, an editor makes the text appear to be formatted in order to help you understand the structure of your program

63
Q

what are two ways that every computer issues commands such as “compile this program” & “run the jvm” etc?

A

You can double-click icons or type verbose commands in a Run dialog box

64
Q

what is the more tedious way of programming only using your computer’s facilities?

A

the more tedious way of programming is when you use your computer’s facilities, you jump from one window to another. You open one window to read Java documentation, another window to edit a Java program, and a third window to start up the Java compiler.

65
Q

what’s the more practical easier way to progam?

A

In the best of all possible worlds, you do all your program editing, documentation reading, and command issuing through one nice interface. This interface is called an integrated development environment (IDE).

66
Q

what can be described about the physical appearance of an IDE?

A

A typical IDE divides your screen’s work area into several panes

67
Q

what is the purpose for different sections within an IDE?

A

an IDE’s environment has several panes for different uses. one pane for editing programs, another pane for listing the names of programs, a third pane for issuing commands, and other panes to help you compose and test programs.

68
Q

what are 3 convenient features about an IDE?

A

You can arrange the panes for quick access.

Better yet, if you change the information in one pane, the IDE automatically updates the information in all the other panes.

An IDE helps you move seamlessly from one part of the programming endeavor to another.

69
Q

what dont you have to worry about when using an IDE?

A

With an IDE, you don’t have to worry about the mechanics of editing, compiling, and running a JVM. Instead, you can worry about the logic of writing programs.

70
Q

what should a beginner java eclipse user expect when first learning to use eclipse?

A

Once you learn to repeat a few routine sequences of steps. After using Eclipse a few times, your brain automatically performs the routine steps.

71
Q

what should a beginner eclipse user expect if he wants to write programs?

A

once youve used eclipse a few times and got the basics down, you can stop worrying about Eclipse and concentrate on Java programming.

72
Q

is Eclipse IDE the onlly IDE there is?

A

As you read my paragraphs about Eclipse, remember that Java and Eclipse aren’t wedded to one another. Instead of using Eclipse, you can use IntelliJ IDEA, NetBeans, BlueJ, or any other Java IDE.

73
Q

what are ways to write code without the aid of an IDE?

A

you can write and run this book’s programs without an IDE. You can use Notepad, TextEdit or vi, along with your operating system’s command prompt or Terminal. It’s all up to you.

74
Q

what should you do if you want to write code on a newer computer ?

A

You may already have some of the tools you need for creating Java programs. But, on a newer computer, your tools may be obsolete. The safest bet is to download tools afresh