DEV Community

Dinesh G
Dinesh G

Posted on

Java Introduction

what is java?

  • java is a popular programming language
  • Java is used to develop mobile apps, web apps, desktop apps, games and much more.

Java was invented by James Gosling while he was working at Sun Microsystems. Development began in 1991, and the first public version was released in 1996. Gosling is widely regarded as the "father of Java." The language was initially named Oak, but it was later renamed Java due to trademark issues.

Key Features:

  • Platform Independent -> write Once, Run Anywhere (WORA)
  • Object-oriented -> Follows OOP principle like encapsulation and inheritences
  • Robust -> Strong memory management and exception handling

  • Multithreaded -> Supports Concurrent execution of thread

  • Secure -> no explicit pointers and runs in a Virtual machine
    .

Common uses

  • Enterprise software
  • Android mobile app development
  • Web applications
  • Cloud-based applications
  • Big data
  • Internet of Things (IoT) applications

Why Learn Java?

  • Used to build Android apps, desktop and web apps, enterprise backend systems, and cloud-based software.
  • Supports object-oriented programming for clean and reusable code.
  • it runs on all platforms windows,mac,and linux using the JVM.
  • Top companies like Amazon, Netflix, and LinkedIn use Java.

What is Java Servlet?

Java servlet is the Java way to develop a web application that can generate dynamic web pages. Servlets are on the server side.

JDK, JRE and JVM:

JDK (Java Development Kit) :Provides tools for development (Compiler, debugger).
JRE (Java Runtime Environment) : Includes libraries and JVM for running Java Applications

JVM (Java Virtual Machine): Converts bytecode into Machine Code and executes it.

Significance of the Main method in Java

Public - Accessible globally
Static - Allows the JVM to call it without object instantiation
Void - Returns no value
String[] args - Accepts Command-line

Here is a simple Java program that prints "Hello World".

public class main{
    public static void main(string []args)
    {
       system.out.print("hello world");
     }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)