Chapter 1 Flashcards

1
Q

What is an Identifier?

A

An identifier is a “word” in a program. It can be made up of letters, digits, the underscore character and the dollar sign. They cannot begin with a digit.

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

Is Java case sensitive?

A

Yes, it is. By convention certain case styles are used for different types of identifiers:

  • Class name: Lincoln
  • Constants: MAXIMUM
  • Variable = radius.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a reserved word?

A

It’s a word that has already a predifinied function in the language. It cannot be used in any other way.

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

What are the four programming language levels?

A
  • Machine language (0s and 1s)
  • Assenbly language (bunch of characters put together)
  • High-level language (such as Java, Python, ecc.)
  • Fourth-generation language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a compiler?

A

A compiler is a software tool which translates source code into a specific target language. This is the approach taken by most programming languages.

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

What is a bytecode?

A

A bytecode is the source code translated from the Java compiler. It’s used to allow any interpreter on any computer to transform the bytecode into machine language.

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

What types of errors do exist?

A

Three types of errors do exist:

  • Compile-time errors: these are errors derivaring from incorrect syntax or logical problems at the Java level (incorrect use of variables/classes/objects).
  • Run-time errors: these are errors that occur during the execution of a program. These might include dividing by 0 for example.
  • Logical errors: these are the worst errors to encounter into. Java read everything correctly and no operational errors were encountered, but the result is wrong or unexpected from the human side. This means that the list of commands, albeit written correctly, doesn’t correspond to what we want from the program.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between classes and objects in Java?

A
An object is defined by a class, it's a single instance, while a class is the blueprint of an object that is still the same although with different objects.
(The class is the employee, while object is a specific employee)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly