Fundamentals of Programming - Lecture 1
Fundamentals of Programming - Lecture 1
3. types of code
Source Code:
This is the human-readable code written by programmers using a specific programming
language. It is the original code that needs to be translated into machine code through
compilation or interpretation.
Machine Code:
Machine code is the lowest-level programming language consisting of binary code (0s and
1s) that directly represents the instructions executed by a computer's central processing unit
(CPU). It is specific to a particular CPU architecture.
Bytecode:
Bytecode is an intermediate code that is generated by a compiler or interpreter. It is not
machine-specific and is often used in virtual machines. Java, for example, compiles source
code into bytecode that runs on the Java Virtual Machine (JVM).
Executable Code:
Executable code is the machine code or bytecode that is ready to be executed by a computer.
It is the compiled version of the source code and can run independently on a computer
system.
Scripting Code:
Scripting languages, like Python or JavaScript, use scripts as their code. These scripts are
often interpreted rather than compiled, and they are commonly used for automation, web
development, and other dynamic tasks.
Library Code:
Libraries contain pre-written code and functions that can be reused in different programs.
They help in modularizing code and promoting code reusability.
Markup Code:
Markup languages, such as HTML (Hypertext Markup Language) and XML (eXtensible
Markup Language), use markup code to define the structure and presentation of documents.
Markup code is not executed like traditional programming code but is interpreted by
browsers or other software.
Assembly Code:
Assembly language is a low-level programming language that is specific to a particular
computer architecture. Assembly code is a human-readable representation of machine code
and is often used for tasks requiring low-level control over hardware.
Version Control Code:
Version control systems, like Git, use code to track changes made to source code over time.
This code includes information about revisions, branches, and merges, facilitating
collaborative development and code management.
Java environment
1. How to install java (process )
2. Java environment
3. What are the features of java
4. What’s the syntax of java
Java Environment:
The Java environment refers to the setup and infrastructure required to run Java
applications. It includes:
Build Tools: Tools like Apache Maven or Gradle help manage dependencies, compile
code, and package applications. They are commonly used in Java development projects.
Features of Java:
Java comes with several features that contribute to its popularity and versatility:
Platform Independence:
Java applications can run on any device with a Java Virtual Machine (JVM), regardless of
the underlying hardware and operating system.
Object-Oriented:
Java is an object-oriented programming language, promoting the use of objects and
classes for code organization and reusability.
Robust and Secure:
Java incorporates features for error handling, memory management, and security to
ensure robust and secure applications.
Multithreading:
Java supports multithreading, allowing programs to execute multiple threads
simultaneously, improving performance.
Rich Standard Library:
Java comes with a comprehensive standard library that provides ready-to-use classes and
methods for common programming tasks.