Learn-Java-With-Me-2.0

☕ JAVA PROGRAMMING LANGUAGE

You can also visit here

📌 Introduction to Programming Language

Programming languages differ from natural languages in that natural languages are used for interaction between people, while programming languages are designed to allow humans to communicate instructions to machines.

🚀 Java Programming Language

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

🛠 Main Features of Java

Java is a general-purpose programming language intended to let programmers “write once, run anywhere,” meaning that compiled Java code can run on all platforms that support Java without the need to recompile.

📜 Birth Of Java

Java was conceived by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. in 1991. It took 18 months to develop the first working version. This language was initially called “Oak,” but was renamed “Java” in 1995. Between the initial implementation of Oak in 1992 and the public announcement of Java in 1995, many more people contributed to the design and evolution of the language.

🎯 Principles of Java

There were five primary goals in creating the Java language:

  1. ✅ It must be simple, object-oriented, and familiar.
  2. 🔒 It must be robust and secure.
  3. 🌍 It must be architecture-neutral and portable.
  4. ⚡ It must execute with high performance.
  5. 🔄 It must be interpreted, threaded, and dynamic.

🌐 How Java Impacted the Internet

Java simplified web programming and introduced a new type of networked program called the Applet, which changed online content delivery. Java also addressed issues such as portability and security.

📌 Java Applet

💡 Fun Fact: JavaScript was named after Java, but they are different languages.

🏢 Who Owns Java Now?

Java is owned by Oracle, and more than 3 billion devices run Java.

🔍 Uses Of Java

🏷 Versions of Java

Version Release Date
JDK Beta 1995
JDK 1.0 January 23, 1996
JDK 1.1 February 19, 1997
J2SE 1.2 December 8, 1998
J2SE 1.3 May 8, 2000
J2SE 1.4 February 6, 2002
J2SE 5.0 September 30, 2004
Java SE 6 December 11, 2006
Java SE 7 July 28, 2011
Java SE 8 (LTS) March 18, 2014
Java SE 9 September 21, 2017
Java SE 10 March 20, 2018
Java SE 11 (LTS) September 25, 2018
Java SE 12 March 19, 2019
Java SE 13 September 17, 2019
Java SE 14 March 17, 2020
Java SE 15 September 15, 2020
Java SE 16 March 16, 2021
Java SE 17 (LTS) September 14, 2021
Java SE 18 March 22, 2022
Java SE 19 September 20, 2022
Java SE 20 March 21, 2023
Java SE 21 (LTS) September 19, 2023
Java SE 22 March 19, 2024
Java SE 23 September 17, 2024

📝 Java Syntax Reference

🏷 Comment Styles

⚙ Getting Started with Java

🖥 Installing JDK in System

  1. Download JDK from Oracle’s official website.
  2. Run java -version in the terminal to check installation.

🚀 First Java Program

/* Example.java */
class Example {
    public static void main(String args[]) {
        System.out.println("This is a simple Java program.");
    }
}

Running the program:

javac Example.java
java Example

Output:

This is a simple Java program.

⚠ Important Notes

🔍 Observing the Code

📝 Comments in Java

Three types of comments in Java:

  1. Single-line Comment: // This is a comment.
  2. Multi-line Comment: java /* This is a multi-line comment. It spans multiple lines. */

  3. Documentation Comment: java /** This is a Javadoc comment. */

🔹 Source File Name

🔹 Class Syntax { }

🔹 Key Concepts


📺 Didn’t understand? No problem: Watch a video tutorial.