Day 1 Flashcards
What’s an assembly language?
- A language created to make programming easier.
- Keywords like add, sub, result.
How can you execute an assembly code?
Using an assembler
Which languages are machine dependent?
Machine language
Assembly language
However, high-level languages are machine independent
What’s a source code?
It’s a program written using a high-level programming language
How is an interpreter different from a compiler?
An interpreter translates and executes the code line by line every time you run the program, so it gives an immediate feedback on errors
On the other hand, a compiler doesn’t do that, it translates the whole code all at once into a machine code executable file, so reporting of any error will be after the compilation
What’s the term for a predefined Java code that can be used to develop programs?
API
Application Programming Interface
What’s the term for a predefined Java code that can be used to develop programs?
API
Application Programming Interface
Enumerate Java editions
• Java Standard Edition (SE)
• Java Enterprise Edition (EE)
• Java Micro Edition (ME)
Enumerate Java editions
• Java Standard Edition (SE)
• Java Enterprise Edition (EE)
• Java Micro Edition (ME)
What are these environments:
Eclipse, IntelliJ IDEA & NetBean?
They’re examples of Integrated Development Environment (IDE)
What’s JDE?
JDE (** Java Development Environment**)
= Java Development Kit (JDK) + Java Virtual Machine (JVM)
Which one doesn’t contain a code editor: JDE or IDE?
JDE
It includes all the essential tools to compile and run Java programs, but doesn’t include a code editor for writing and editing code
However an IDE contains a code editor and all the essential Java tools in addition to debugging tools
Which environment gives Java the advantage to be machine independent?
Java Virtual Machine
which executes Java bytecode in the machine according to its requirements
What’s the difference between these two lines?
1. return String method draw() {
code block
}
2. draw (“tree”);
- It’s method declaration
- This is method calling
True of false?
We can NOT have a Java program without a main method
True
Which convention is used to name a class?
Pascal Case Convention
Write a complex variable name its correct convention
- The right convention is Camel Case
- Example: drawAPlane/ bendTheKnee
public class Main {
code block
}
This program won’t work, give the reason
Because there’s no main method, so the correct code must be like this:
public class main {
public static void main(String[] args) { }
}
What’s the out in System.out.print() method?
out is an object (field) of a class (which is System)
What’s the difference betweenprintln & print methods?
println displays parameters with lines breaking between them on the console window
print displays parameters all in one line one after another