Tools: Every Small Step Counts, Every BIT of Learning Matters

Tools: Every Small Step Counts, Every BIT of Learning Matters

Source: Dev.to

Hello Learners!!
My blog journey starts with JAVA!Yes let me share my learnings in JAVA.
When I first heard about Java during my college days, it always seemed daunting—all the classes, objects, and complex syntax felt overwhelming. But I realized the key is simple: start with the basics and let curiosity lead the way.
Come on, join me on my Java journey! World's first Programmer:
Ever thought about who was World's first programmer? It was Ada Lovelace.
Ada Lovelace (1815–1852) was an English mathematician recognized as the world's first computer programmer for her work on Charles Babbage's Analytical Engine, including the first algorithm designed for machine execution. T
Ada wrote what we now call the first computer program: an algorithm to compute Bernoulli numbers. Modern Programming Language:
After Ada Lovelace wrote the first algorithm for Charles Babbage’s Analytical Engine (1840s), there was actually a long gap before modern programming languages appeared — because electronic computers didn’t exist yet. Once computers were developed in the 1940s, programming started evolving quickly. Here’s the simple timeline after Ada Lovelace: Machine Language (1940s) - 1st Generation language Machine language was the first type of programming language used in early computers like ENIAC
EDVAC during the 1940s. It is written in binary code (0s and 1s) — the only language a computer directly understands. No translator (compiler/interpreter) needed — the computer executes it directly.since this machine language was harder for humans to read,but easier for the computer to understand .Hardware Dependent - Error-prone and not portable across different CPU types.so it is known as LOW-LEVEL Language. Assembly language (1950s) 2nd-generation language
After machine language, Assembly language emerged in the late 1940s to early 1950s, serving as the first step to improve readability. It replaced raw binary code with _mnemonics _
(e.g., ADD, MOV) that were easier for humans to write, requiring an assembler to convert them back into machine code.
Assembler: Human-friendly mnemonics → mapped to machine code
It is also considered as Low level language because it is very close to the hardware (CPU).
Still hardware-specific → not portable. Third Generation (3GL): High-Level Languages Definition: 3GLs are high-level programming languages designed to be human-readable and easier to write than assembly or machine code.
Examples: FORTRAN (1957),COBOL (1959),C (1972),Pascal (1970).
**Modern 3GLs **are more abstracted from hardware and often include features like: Object-oriented programming (OOP) → Java, Python Automatic memory management → Python (garbage collection) Rich standard libraries and APIs → Java, Python
Modern 3GL - Java(1995),Python(1991). They abstract away hardware details, so you don’t need to know the CPU’s instruction set. Programs written in 3GLs require a compiler or interpreter to convert them into machine code that the CPU can execute.
**
**Fourth Generation Languages (4GLs) 4GLs are even higher-level languages designed to make programming faster, easier, and closer to human thinking. They often focus on specific tasks, like database management, reports, or GUI development. Jumping into Java.................... Java is a high level programming language.
Java was initially named Oak in 1991 by its creator James Gosling.
The name was later changed to Java, inspired by Java coffee from Indonesia There are so many features First lets see how Java is said to be platform independent.
to completely understand about platform independency, first lets understand platform dependency.
Platform dependency
When you write a program in C, the C compiler converts your human-readable source code (.c) into machine code (binary) that the computer can execute.
If you compile on Windows, the compiler produces Windows-specific machine code.
This code is designed for Windows OS and possibly the Windows version of the CPU instructions.
ie..the machine code generated for same program on different operating system is different.so Machine code is not portable across different operating systems or sometimes even different CPUs. ✅ Conclusion: You cannot directly run a Windows-compiled C program on Linux. To Make it work on Linus OS,recompile the source code on Linux using a Linux C compiler. Platform Independent:
Lets see deeper into Java Platform Components - JDK,JRE,JVM,JIT JDK
JDK is Java Development Kit.
This is used to write,compile and run the java programs. It contains the JRE and a set of development tools,
compiler (javac), debugger, and utilities like jar and javadoc.
Provides the JRE, so it also allows running Java programs.
Required by developers to write, compile, and debug code.
Components of JDK: JRE (JVM + libraries)
Development tools (compiler, jar, javadoc, debugger)
Note:
JDK is only for development (it is not needed for running Java programs)
JDK is platform-dependent (different version for windows, Linux, macOS)Based on Processor and OS,we can download JDK in (https://www.oracle.com/java/technologies/downloads/)
Working of JDK:
Source Code (.java): Developer writes a Java program.
Compilation: The JDK’s compiler (javac) converts the code into bytecode stored in .class files.
Execution: The JVM executes the bytecode, translating it into native instructions.
JRE (Java Runtime Environment)
JRE provides an environment to run Java programs but does not include development tools. It is intended for end-users who only need to execute applications. Contains the JVM and standard class libraries.
Provides all runtime requirements for Java applications.
Does not support compilation or debugging.
Note:
JRE is only for running applications, not for developing them.
It is platform-dependent (different builds for different OS).
JVM (Java Virtual Machine)
JVM is the core execution engine of Java. It is responsible for converting bytecode into machine-specific instructions. Part of both JDK and JRE.
Performs memory management and garbage collection.
Provides portability by executing the same bytecode on different platforms.
Note: JVM implementations are platform-dependent.
Bytecode is platform-independent and can run on any JVM.
Modern JVMs rely heavily on Just-In-Time (JIT) compilation for performance. Now let me explain about Platform independency.
Since Java compiler converts human readable code into "BYTECODE"- which is intermediatory code - neither human readable nor machine readable is highly secured.
JDK is not platform independent ,only BYTECODE is platform independent which makes JAVA -WORA language.
what about JVM? It is also not platform independent.
it plays a part in converting byte code into binary codes.Bytecode is platform-independent and can run on any JVM. Data types in JAVA
A datatype in programming defines the type of data a variable can hold, how much memory it occupies, and what operations can be performed on it. Java programming language is statically-typed, which means that all variables must first be declared before they can be used.
Java has primitive data types and non primitive datatypes. Why byte size matters for different data types:
Range matters because it defines what numbers a variable can safely store.
Too small → overflow / wrong results
Too large → wastes memory Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse - Known is a drop!
Even if two CPUs are both “64-bit,” one might use x86-64 (Intel/AMD) and another ARM64 (Apple/ARM). Their machine code and assembly instructions are totally different, which is why software compiled for one doesn’t run on the other without adaptation. - SQL – Structured Query Language for databases
- MATLAB – Math, engineering, simulations
- Visual Basic – GUI and business apps
- SAS – Statistical analysis
- Oracle Reports / PowerBuilder