Introduction Flashcards

Intro to Programming, Variables, Data Types & Operators.

1
Q

What is a command in programming?

A

A directive telling the computer to perform a specific action (e.g., print()).

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

What is a statement in programming?

A

A complete unit of execution that performs an action (e.g., if statement, for loop).

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

What is an expression in programming?

A

A combination of variables, operators, and values that produce a result (e.g., x + 5).

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

How do commands, statements, and expressions relate?

A

Commands execute tasks, statements perform actions (often containing expressions), and expressions compute values.

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

What is coding?

A

Writing code to implement specific logic in a programming language.

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

What is programming?

A

The broader process of designing, writing, testing, and maintaining software, which includes coding.

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

What’s the key difference between coding and programming?

A

Coding is writing syntax; programming involves solving problems and designing systems.

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

Which skills are needed for coding vs programming?

A
  • Coding: Syntax knowledge, debugging, basic problem-solving.
  • Programming: Analytical thinking, algorithms, design, testing, and collaboration.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the main components of a programming language?

A

Syntax, data types, variables, operators, control structures, functions, and error handling.

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

What are control structures in a programming language?

A

Constructs like loops and conditionals that manage program flow.

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

What role do functions play in a programming language?

A

Reusable blocks of code that perform specific tasks, often with inputs and outputs.

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

What is the purpose of data types in programming?

A

Define the types of data a program can manipulate, such as integers, strings, or objects.

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

What is the relationship between JDK, JRE, and JVM?

A

JDK: A toolkit for developing Java applications, including the JRE.
JRE: Used to run Java applications; includes the JVM.
JVM: The engine that runs Java bytecode and manages execution.

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

What are the types of memory in the JVM?

A

Heap: Stores objects.
Stack: Stores method calls and local variables.
Method Area (MetaSpace): Stores class metadata.
Program Counter Register: Tracks thread execution.
Native Method Stack: For managing native code.

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

What is the role of the JIT compiler in Java?

A

Converts bytecode into machine code at runtime to improve performance.

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

What is the Java Class Library (JCL)?

A

A collection of pre-written Java classes providing reusable functionality (e.g., java.util, java.io).

17
Q

What is the Java Standard Extension (JSE)?

A

A set of additional libraries that offer specialized functionality beyond the JCL (e.g., JavaMail, JDBC).

18
Q

What does it mean to have a solid foundation in programming?

A

A strong understanding of basic concepts like variables, loops, conditionals, and algorithms.

19
Q

What are transferable skills in programming?

A

Problem-solving, logical thinking, debugging, and understanding algorithms, useful across tasks and fields.

20
Q

What’s the difference between synchronous and concurrent programming?

A

Synchronous: Tasks executed one after another.
Concurrent: Multiple tasks progress in overlapping time periods, but not necessarily simultaneously.

21
Q

What is multi-threading in Java?

A

Running multiple threads (independent tasks) simultaneously.

22
Q

What is a blocking operation in Java?

A

An operation where a thread waits for a resource or task to complete before continuing.