Ch1 Sec.3-4 Flashcards

comments and whitespace

1
Q

comment?

A

not read by code but there for other programmers to read 2 types of comments

-sometimes code is commented out temporarily too so it does not execute

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

Single-line comment?

A

// then whatever the comment is. usually after code.

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

multi-line comment?
or
block comment

A
/* whatever the comment is and then ended with */
*/ can be used with a single line too
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

whitespace? / newlines?

A

spaces or hit return and leave a space.. used to make code readable.
-indentations are good too so its easy to see which code goes with what or if code is embedded within code then it can be seen.

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

are blank lines considered code?

A

yes but it is ignored by compiler most of the time

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

syntax error?

A

the symbols in a program are used incorrectly.

–missing a semicolon.. etc.

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

do upper and lowercase letter matter in the code?

A

yes, especially with the name of objects or any commands used.

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

compile time error?

A

error that the compiler detects

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

Logical error?

A

cant be detected by the compiler and instead the program does something you dont want because you used the wrong code.
logical errors are also called bugs

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

compiler warning?

A

sometimes logical issues are found but the code can still pass errors and therefore the code can be compiled. warnings should not exist b/c it can cause logical errors.

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

program also called a?

A

application

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

assembly language?

A

human readable processor instructions

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

compiler?

A

translates language program into low level machine instructions.. 0s and 1s

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

machine instruction?

A

0s and 1s stored in memory, tells processor to carry out operations like multiplication.

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

the following identifiers are part of what? string, system, out, println.

A

Java Standard Library.

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

what is the Java Standard Library?

A

identifiers that other programmers have pre-defined using sets of classes and methods.

17
Q

is Java Case sensitive?

A

Yes

best practice is to use identifiers that are different and not the same word with different caps.

18
Q

what letters and symbols can be used as part of an identifiers name?

A
uppercase and lowercase
any letter
the symbols:
$ , _
0 through nine
19
Q

what is the preferred case (upper/lower) for identifiers?

A

1st letter of each word should be uppercase ,

20
Q

how is a name in java written in code?

A

series of identifiers separated by the period character.

21
Q

compiler?

A

translates computer language (source code) into code for the processor.(into target language)

22
Q

interpreter?

A

like a compiler but it also executes the code and does so one line at a time.

23
Q

how is java code translated and why does this allow it to be used on many devices?

A

the high level language (java) is run through an interpreter where it becomes the target language of bytecode. this code works universally on cpus.

24
Q

byte code?

A

one level above machine language and requires cpus to have bytecode compilers onboard in order for the code to work on its system.

25
Q

IDE?

A

IDE= integrated development environment – allows set of tools to be used to edit or create software (java).

26
Q

can the command line be used as an interpreter/ compiler?

A

yes. java developer kit - SDK does not have its own compiler.