Java Programming Language

  • Last Updated : 16 Nov, 2021

Complete Java Tutorial

Java is one of the most popular and widely used programming languages.

  • Java has been one of the most popular programming languages for many years.
  • Java is Object Oriented. However, it is not considered as pure object-oriented as it provides support for primitive data types (like int, char, etc)
  • The Java codes are first compiled into byte code (machine-independent code). Then the byte code runs on Java Virtual Machine (JVM) regardless of the underlying architecture.
  • Java syntax is similar to C/C++. But Java does not provide low-level programming functionalities like pointers. Also, Java codes are always written in the form of classes and objects.
  • Java is used in all kinds of applications like Mobile Applications (Android is Java-based), desktop applications, web applications, client-server applications, enterprise applications, and many more.
  • When compared with C++, Java codes are generally more maintainable because Java does not allow many things which may lead to bad/inefficient programming if used incorrectly. For example, non-primitives are always references in Java. So we cannot pass large objects (like we can do in C++) to functions, we always pass references in Java. One more example, since there are no pointers, bad memory access is also not possible.
  • When compared with Python, Java kind of fits between C++ and Python. The programs are written in Java typically run faster than corresponding Python programs and slower than C++. Like C++, Java does static type checking, but Python does not.


Simple Hello World Program :

// A Java program to print "Hello World" 
public class GFG { 
    public static void main(String args[]) 
    { 
        System.out.println("Hello World"); 
    } 
}

Output:

Hello World

Recent Articles on Java

Java Programs – Basics to Advanced

Overview, Basics, Input/Output, Flow Control, Operators, Strings, Arrays, OOPs Concepts, Inheritance, Abstraction, Encapsulation, Polymorphism, Constructors, Methods, Interfaces, Wrapper Classes, Keywords, Access Modifiers, Memory Allocation, Classes, Packages, Collection Framework, List, Queue, Map, Set, Exception Handling, Multithreading, Synchronization, File Handling, Regex, Java IO, Networking, Java 8 Features, Date & Time, JDBC, Miscellaneous, Interview Questions

Overview of Java

Basics of Java

Input/Output in Java

Flow Control in Java

Operators in Java

Strings in Java

Arrays in Java

OOPS in Java

Inheritance in Java

Abstraction in Java

Encapsulation in Java

Polymorphism in Java

Constructors in Java

Methods in Java

Interfaces in Java

Wrapper Classes in Java

Keywords in Java

Access Modifiers in Java

Memory Allocation in Java

Classes of Java

Packages in Java

Collection Framework

List

Queue

Map

Set

Exception Handling in Java

Multithreading in Java

Synchronization in Java

File Handling in Java

Java Regex

Java IO

Java Networking

Java SE 8 Features

Java Date & Time

Java JDBC

Java Miscellaneous

Interview Questions on Java


GeeksforGeeks Courses:

1. Language Foundation Courses [C++ / JAVA / Python ]
Learn any programming language from scratch and understand all its fundamentals concepts for a strong programming foundation in the easiest possible manner with help of GeeksforGeeks Language Foundation Courses – Java Foundation | Python Foundation | C++ Foundation

2. DSA Live For Working Professionals
Get interview-centric live online classes on Data Structure and Algorithms from any geographical location to learn and master DSA concepts for enhancing your problem-solving & programming skills and to crack the interview of any product-based company – DSA Live For Working Professionals

3. Complete Interview Preparation
Get fulfilled all your interview preparation needs at a single place with the Complete Interview Preparation Course that provides you all the required stuff to prepare for any product-based, service-based, or start-up company at the most affordable prices.

4. DSA Self Paced
Start learning Data Structures and Algorithms to prepare for the interviews of top IT giants like Microsoft, Amazon, Adobe, etc. with DSA Self-Paced Course where you will get to learn and master DSA from basic to advanced level and that too at your own pace and convenience.

5. Company Specific Courses – Amazon, Microsoft, TCS & Wipro
Crack the interview of any product-based giant company by specifically preparing with the questions that these companies usually ask in their coding interview round. Refer GeeksforGeeks Company Specific Courses: Amazon SDE Test Series, etc.


My Personal Notes arrow_drop_up


Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.