Lec 2: Intro to Java Flashcards

1
Q

What are the 3 lvs of programming languages?

A

Machine language
Assembly Language
High-level language

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

What level of language describes binary instructions?
a) Machine language
b) Assembly language
c) High level language

A

Machine

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

What language was developed to make programming easier than machine code?

A

Assembly

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

What language is this from?
ADDF3 R1, R2, R3

A

Assembly

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

What level of programming language is english-like and easy to learn/understand

A

High level

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

What level of programming language is this from?
area = 5 * 5 * 3.1415

A

High level

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

What is the name of a program written in high level called?

A

Source code or source program

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

What is the name of the program that is used to convert assembly language to machine code?

A

Assembler

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

True or False: A source program must be translated into machine code for execution

A

True

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

What is the use of an interpreter

A

Translation from high level to machine code

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

What is the name of the java compiler

A

javac

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

What is the name of the interpreter for java

A

java

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

True or false:
Java is a strongly typed language

A

true

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

True or false:
Every Java program must have at least one class

A

true

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

True or false:
In order to run a class, the class must contain a method named main

A

true

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

From where is the program executed?

A

From the main method

17
Q

What are the uses of identifiers?

A

identify the elements such as classes, methods, and vars

18
Q

True or false:
An identifier must start with a letter, an underscore, or a dollar sign

19
Q

True or false:
An identifier cannot be a reserved word

20
Q

_ is a software that interprets java bytecode

A

java virtual machine

21
Q

java compiler that translate java source code into _

A

java bytecode by javac cmd

22
Q

What is the java virtual machine or JVM?

A

interprets java bytecode by running the java command

23
Q

What is the Java interpreter

A

The Java Virtual Machine, by the java command, reads the already compiled java bytecode to execute

24
Q

File formats that the javac compiler takes in to compile

25
_ contains predefined classes and interfaces for developing Java programs
Java API
26
main method header is
public static void main(String[] args)
27
What is the JDK command to compile a class in the file Test.java
javac Test.java
28
What file format is where javac storing the bytecode?
.class
29
What file type is source code stored in?
.java
30
How to make comments?
** comment ** --comment
31
List common reserved words
void public static class
32
What is a block of code enclosed in?
{}