Java SE Tutorial

Welcome to Java SE

Java SE (Java Standard Edition) is a platform-independent programming language developed by Oracle Corporation. It provides a comprehensive set of classes and libraries for developing applications, including core Java features such as collections, threading, and networking.

public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }

Getting Started with Java

To start learning Java, you need to download the JDK (Java Development Kit) and install it on your computer. Once installed, you can create a new Java project and write your first program.

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter your name: "); String name = scanner.nextLine(); System.out.println("Hello, " + name + "! Welcome to Java SE."); } }

Java Syntax and Structure

Java programs are made up of classes, methods, and packages. Each class contains one or more methods, which are the functions of the program. The basic structure of a Java program includes the package declaration, class declaration, and method definitions.

package com.example.tutorial; public class Example { public static void main(String[] args) { System.out.println("This is an example of Java syntax."); } }

Java Data Types

Java has various data types, including integers, floating-point numbers, booleans, and more. These data types are used to store different kinds of values in variables.

int number = 10; double decimal = 3.14; boolean isTrue = true; char letter = 'A';