Introduction Flashcards
Intro to Programming, Variables, Data Types & Operators. (22 cards)
What is a command in programming?
A directive telling the computer to perform a specific action (e.g., print()).
What is a statement in programming?
A complete unit of execution that performs an action (e.g., if statement, for loop).
What is an expression in programming?
A combination of variables, operators, and values that produce a result (e.g., x + 5).
How do commands, statements, and expressions relate?
Commands execute tasks, statements perform actions (often containing expressions), and expressions compute values.
What is coding?
Writing code to implement specific logic in a programming language.
What is programming?
The broader process of designing, writing, testing, and maintaining software, which includes coding.
What’s the key difference between coding and programming?
Coding is writing syntax; programming involves solving problems and designing systems.
Which skills are needed for coding vs programming?
- Coding: Syntax knowledge, debugging, basic problem-solving.
- Programming: Analytical thinking, algorithms, design, testing, and collaboration.
What are the main components of a programming language?
Syntax, data types, variables, operators, control structures, functions, and error handling.
What are control structures in a programming language?
Constructs like loops and conditionals that manage program flow.
What role do functions play in a programming language?
Reusable blocks of code that perform specific tasks, often with inputs and outputs.
What is the purpose of data types in programming?
Define the types of data a program can manipulate, such as integers, strings, or objects.
What is the relationship between JDK, JRE, and JVM?
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.
What are the types of memory in the JVM?
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.
What is the role of the JIT compiler in Java?
Converts bytecode into machine code at runtime to improve performance.
What is the Java Class Library (JCL)?
A collection of pre-written Java classes providing reusable functionality (e.g., java.util, java.io).
What is the Java Standard Extension (JSE)?
A set of additional libraries that offer specialized functionality beyond the JCL (e.g., JavaMail, JDBC).
What does it mean to have a solid foundation in programming?
A strong understanding of basic concepts like variables, loops, conditionals, and algorithms.
What are transferable skills in programming?
Problem-solving, logical thinking, debugging, and understanding algorithms, useful across tasks and fields.
What’s the difference between synchronous and concurrent programming?
Synchronous: Tasks executed one after another.
Concurrent: Multiple tasks progress in overlapping time periods, but not necessarily simultaneously.
What is multi-threading in Java?
Running multiple threads (independent tasks) simultaneously.
What is a blocking operation in Java?
An operation where a thread waits for a resource or task to complete before continuing.