Variables and DataTypes Flashcards

1
Q

What is the relationship between Java and JavaScript?

A

There is no relationship

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

Source Code

A

Code created by a programmer and saved as a .java file

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

Byte Code

A

Is a compiled code that can be read by the JVM independent of the Operating System (Windows, Mac OS, Linux, etc.). Stored in .class files

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

Machine Code

A

Is a compiled code that can be read by a specific operating system. Created by the JVM when running.

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

Java Architecture

A
A programmer writes Source Code in .java files --->
javac compiles the source code into Byte Code in .class files --->
Java Virtual Machine (JVM) interprets Byte Code into Machine Code that can be understood by the computer’s operating system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Java Version Check

A

In terminal: java -version

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

Java JDK (Java Development Kit) Version Check

A

In terminal: javac -version

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

Java Runtime Environment (JRE)

A
Allows execution of Java applications.
Installed by default on most OSs
Contains the JVM
Does not contain libraries and tools for development
Used by home users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Java Development Kit (JDK)

A

Includes development library and tools
Includes the javac compiler
Includes the JRE and JVM
Used only by developers

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

Workspace

A

A folder or a directory on the harddrive where Eclipse stores preferences, configurations, and project information about the projects added to the workspace.

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

Eclipse is an IDE (Integrated Development Environment)

A

Organizes code into projects and workspaces
Provides immediate feedback on syntax errors
Assists in code with Intellisense
Allows us to suspend a program and step through using a Debugger

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

Variables

A

A storage container paired with a name. It holds some known or unknown amount of information, called the value.

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

Parts of variables

A

Data Type
Name
Value

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

Data Type

A

Defines the type of data stored in a variable and how it’s represented

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

Name

A

A label that defines what the variable represents

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

Declaration

A

Defines the Data Type and Name

17
Q

Assignment

A

Sets a value

18
Q

Casting

A

Allows us to tell Java to treat a variable as a different data type, provided they both hold the same type of data.

19
Q

Widening

A

Casting from a smaller data type into a larger data type. For example int to long.
Casting is implicit
int x = 10;
long y = x;

20
Q

Narrowing

A

Casting from a larger data type to a smaller one. For example, long to int or double to int
Narrowing is explicit
long x= 10;
int y = (int) x;
Explicit casting puts the data type beside the value being cast in parenthesis

21
Q

Truncation

A

Truncation is when we go from a larger to smaller data type and lose data in the process.
25.782 - Truncated to a whole number - 25

22
Q

Integrated development environment (IDE)

A

Is a software application that provides comprehensive facilities to computer programmers for software development. Normally consists of at least a source code editor, build automation tools, and a debugger.