chapter 3 Flashcards

1
Q

how do you get the console view to appear if it isn’t already there?

A

You may not see a Console tab in the lower-right part of the Eclipse workbench. To coax the Console view out of hiding, choose Window ⇒ Show View ⇒ Other. In the resulting Show View dialog box, expand the General branch. Finally, within that General branch, double-click the Console item.

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

if you wanted to stop a program from running dead in it’s tracks at runtime, what should you do?

A

Occasionally, you decide in the middle of a program’s run that you’ve made a mistake of some kind. You want to stop the program’s run dead in its tracks. Simply click the little red square above the Console view.

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

what are two ways to create a seperate workspace in Eclipse?

A

Here are two ways to create a new workspace: When you launch Eclipse, type a new folder name in the Workspace field of Eclipse’s Workspace Launcher dialog box. If the folder doesn’t already exist, Eclipse creates the folder. If the folder already exists, Eclipse’s Package Explorer lists any projects that the folder contains.

On the Eclipse workbench’s main menu, choose File ⇒ Switch Workspace. (See Figure 3-6.) When you choose File ⇒ Switch Workspace, Eclipse offers you a few of your previously opened workspace folders. If your choice of folder isn’t in the list, select the Other option. In response, Eclipse reopens its Workspace Launcher dialog box.

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

how important is it when it comes to using capital letters or lowercase letters when writing java programs?

A

Java is case-sensitive, which means that system.out.printLn isn’t the same as System.out.println. If yOu tyPe system.out.printLn, your progrAm won’t worK. Be sUre to cAPItalize your codE eXactLy as it is in

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

when using quotation marks in your code what is important to keep in mind?

A

If you copy and paste code from an ebook, check to make sure that the quotation marks in the code are straight quotation marks (“”), not curly quotation marks (“ ”). In a Java program, straight quotation marks are good; curly quotation marks are troublesome.

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

what happens if you do not type in code correctly? what kind of signs do you see that indicate there is something wrong with your code?

A

If you don’t type the code correctly, you may see jagged red underlines, tiny rectangles with X-like markings inside them, or other red marks in the editor.

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

what kind of error prevents the computer from translating your code?

A

The red marks in Eclipse’s editor refer to compile-time errors in your Java code. A compile-time error (also known as a compiler error) is an error that prevents the computer from translating your code.

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

how do you display line numbers in eclipse’s editor if they are not already showing?

A

Line numbers appear in the editor’s left margin. To make Eclipse’s editor display line numbers, choose Window ⇒ Preferences (in Windows) or Eclipse ⇒ Preferences (on a Mac). Then choose General ⇒ Editors ⇒ Text Editors. Finally, put a check mark in the Show Line Numbers check box.

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

what can you do if you have a jagged red underline appear in your code?

A

you can hover the mouse pointer over the jagged red underline. When you do, you see a brief explanation of the error along with some suggestions for repairing the error — some quick fixes.

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

when using the eclipse editor you see certain words in different colors. is this formatting?

A

When you use Eclipse’s editor to write a Java program, you see words in various colors. Certain words are always blue. Other words are always black. You even see some bold and italic phrases. You may think you see formatting, but you don’t. Instead, what you see is called syntax coloring or syntax highlighting.

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

how is syntax highlighting useful?

A

With a Java program editor, things like bold and coloring aren’t marked inside the Java program file. Instead, the editor displays each word in a way that makes the Java program easy to read.

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

besides looking out for compile time errors in your code, what are 3 things to watch out for in your code?

A

In addition to compile-time errors, some other kinds of gremlins can hide inside a Java program: such as, unchecked runtime exceptions, logic errors, compile time warnings

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

what is an unchecked runtime exception? when does an unchecked runtime exception occur?

A

Eclipse’s editor doesn’t warn you about an unchecked runtime exception because, until you run the program, the computer can’t predict that the exception will occur.

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

describe 3 things about logic errors

A

Logic errors are the most challenging errors to find and to fix. And worst of all, logic errors often go unnoticed.

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

how serious are compile time warnings? describe the appearance of compile time warnings

A

A warning isn’t as severe as an error message. So, when Eclipse notices something suspicious in your program, the editor displays a jagged yellow underline, a tiny yellow icon containing an exclamation point, and a few other not-so-intrusive clues.

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

what is indicated when you spot a compile time error? and what should you do when a compile time error occurs? should a compile time error be fixed before running your program or continuing to write your code?

A

When you’re sure that you know what you’re doing, you can ignore warnings and worry about them at some later time. But a warning can be an indicator that something more serious is wrong with your code. My sweeping recommendation is this: Pay attention to warnings. But, if you can’t figure out why you’re getting a particular warning, don’t let the warning prevent you from moving forward.

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

what is the workbench?

A

The workbench is the environment in which you develop code.

18
Q

what is an area in eclipse’s ide? give 3 examples of eclipse’s areas

A

A section of the workbench seperated by borders such as package explorer, console view, editor, etc.

19
Q

what is a window in eclipse? how many windows can you display?

A

A copy of the Eclipse workbench. With Eclipse, you can have several copies of the workbench open at once. Each copy appears in its own window.

20
Q

what is an action in Eclipse? name 7 actions of the Eclipse IDE

A

an action is A choice that’s offered to you — typically, when you click something. For example, when you choose File ⇒ New on Eclipse’s main menu bar, you see a list of new things that you can create. The list usually includes Project, Folder, File, and Other, but it may also include things like Package, Class, and Interface. Each of these things (each item on the menu) is called an action.

21
Q

what is the difference between views, editors, and areas in the eclipse workbench?

A

Views: Show information (e.g., Project Explorer) but don’t modify code directly.

Editors: Where you write and modify your code (e.g., Java editor).

Areas: Layouts in the Eclipse workbench where views and editors are placed (e.g., Editor area, View area).

22
Q

where in the eclipse workbench do you see overlapping windows?

A

areas can have overlapping windows (like editors and views) and sometimes include tabs for switching between open editors or views. For example, the Editor area often has tabs for multiple open files, while Views (like Console or Project Explorer) can also have tabbed sections.

23
Q

what is a tab in eclipse?

A

tab: Something that’s impossible to describe except by calling it a tab. That which we call a tab by any other name would move us as well from one view to another or from one editor to another. The important thing is, views can be stacked on top of one another. Eclipse displays stacked views as though they’re pages in a tabbed notebook. Each view has its own tab.

24
Q

what is a bunch of stacked tabs called?

A

A bunch of stacked views is called a tab group

25
Q

how do you bring a tab to the forefront of other tabs?

A

To bring a view in the stack to the forefront, you click that view’s tab.

26
Q

what is interesting about tabs and editors compared to tabs and views?

A

all this stuff about tabs and views holds true for tabs and editors. The only interesting thing is the way Eclipse uses the word editor. In Eclipse, each tabbed page of the editor area is an individual editor.

27
Q

what is a toolbar in eclipse and where is it located?

A

Toolbar: The bar of buttons (and other little things) at the top of a view.

28
Q

what is a menu button in eclipse?

A

Menu button: A downward-pointing arrow in the toolbar. When you click the Menu button, a drop-down list of actions appears. actions you see in the list varies from one view to another.

29
Q

what is a close button in eclipse?

A

Close button: A button that gets rid of a particular view or editor.

30
Q

what is a chevron in eclipse?

A

Chevron: A double arrow indicating that other tabs should appear in a particular area (but that the area isn’t wide enough).

31
Q

when a chevron has a number, what does this mean?

A

if The chevron has a little number 2 beside it, this tells you that, in addition to the two visible tabs, two tabs are invisible.

32
Q

how do you look at the other tabs in eclipse if the chevron has a number on it?

A

Clicking the chevron brings up a hover tip containing the labels of all the tabs.

33
Q

what is a marker bar in eclipse and where is it located?

A

Marker bar: The vertical ruler on the left edge of the editor area. Eclipse displays tiny alert icons, called markers, inside the marker bar.

34
Q

what does the collapse all icon in the package explorer’s toolbar do?

A

if you have several branches open in the package explorer, it resets them all into their most reset collapsed state so that it’s quicker than going one by one trying to reset all open branches.

35
Q

what is a layout in eclipse?

A

Layout: An arrangement of certain views.

36
Q

what is the perspective layout?

A

Perspective: A very useful layout. it’s the defaulted eclipse workbench layout.

37
Q

how do you create a layout so you can use it again?

A

. If a particular layout is really useful, someone gives that layout a name. And if a layout has a name, you can use the layout whenever you want.

38
Q

what do you do if you want the console view to appear if it isn’t already there?

A

If you want to force the Console view to appear, choose Window ⇒ Show View ⇒ Other. In the resulting Show View dialog box, expand the General branch. Finally, within that General branch, double-click the Console item.

39
Q

how do you switch the perspective in eclipse?

A

You can switch among perspectives by choosing Window ⇒ Open Perspective in Eclipse’s main menu bar. if you like poking around, visit some of the other perspectives to get a glimpse of Eclipse’s power and versatility.

40
Q

what can you do with Eclipse workbench areas besides editing and viewing information?

A

Use the mouse to drag the boundaries between the areas (and thus resize each of the areas).

41
Q

if youve resized areas or changed around the order of the areas in eclipse and want to reset the workbench areas, what can you do?

A

To get the areas back to the way they were before resizing, select Window ⇒ Perspective ⇒ Reset Perspective from Eclipse’s main menu.

42
Q
A