Java Programming
Learn Java from fundamentals through object-oriented programming, problem solving, placement programs, and interview preparation.
Build knowledge step by step
Learn Java from fundamentals through object-oriented programming, problem solving, placement programs, and interview preparation.
What you will study
1
Module 1
Java Fundamentals
Build a clear foundation in the Java platform, program structure, variables, and data.
2
topics
22
lessons
530 minutes
⌄
Java Fundamentals
Build a clear foundation in the Java platform, program structure, variables, and data.
Getting Started
Understand Java, its runtime platform, toolchain, and the structure of a first program.
What is Java?
Understand Java as both a strongly typed programming language and a portable runtime platform.
History of Java
Learn how Java developed from an embedded-device project into one of the world’s most widely used programming platforms.
Features of Java
Understand the major features that make Java portable, secure, reliable, object-oriented, and suitable for modern software development.
Applications of Java
Explore the major areas where Java is used, including enterprise systems, web backends, Android applications, cloud services, big-data platforms, desktop software, scientific tools, games, and Internet of Things solutions.
Java Editions: SE, EE and ME
Java SE is the core platform, Jakarta EE builds enterprise services on those foundations, and Java ME targets constrained devices.
Java Architecture
Java architecture separates source compilation from bytecode execution. The JVM loads, verifies and runs class files.
JDK
The Java Development Kit, or JDK, contains the compiler, runtime and development tools used to build Java programs.
JRE
The Java Runtime Environment, or JRE, is the software needed to run Java applications.
JVM
The Java Virtual Machine, or JVM, executes Java bytecode and manages runtime services such as memory and garbage collection.
Installing Java
Install a Java 21 JDK, configure the command path when necessary, and verify both the runtime and compiler.
First Java Program
A first Java program places a main method inside a class and prints a message with System.out.println.
Java Program Structure
A Java source file organizes code into classes, methods, blocks and statements.
Compilation and Execution Process
The javac compiler translates Main.java into Main.class, then the java launcher asks the JVM to execute Main.
Java Comments
Comments explain code for people and are ignored by the compiler. Java supports line, block and documentation comments.
Variables and Data
Learn how Java names, stores, represents, and converts values.
Variables in Java
A variable is a named memory location whose value can be read or changed while a program runs.
Variable Naming Rules
A Java identifier may use letters, digits, underscore and dollar sign, but it cannot start with a digit or be a reserved keyword.
Java Naming Conventions
Java conventions use lowerCamelCase for variables and methods, UpperCamelCase for classes, and UPPER_SNAKE_CASE for constants.
Data Types
A data type tells Java what kind of value a variable stores and which operations are valid.
Literals
A literal is a value written directly in source code, such as 42, 3.5, true, 'A' or "Java".
Constants
A constant is a value that should not change after assignment. Java declares it with the final keyword.
Type Conversion
Type conversion changes a value from one data type to another. Java performs safe widening conversions automatically.
Type Casting
Type casting explicitly requests a conversion that Java will not perform automatically, often from a wider numeric type to a narrower one.