About 5,730 results
Open links in new tab
  1. Java code samples
    Diverse Java programming examples showcasing practical applications, games, and utility tools
    Calculator
    Basic operations
    Guess the Number Game
    Interactive gameplay
    Currency Converter
    Practical utility
    Digital Clock
    Time display
    ToDo App
    Task management
    QRCodeFX
    QR code generation
    Weather Forecast App
    Weather updates
    Temperature Converter Tool
    Unit conversion
    Word Counter Tool
    Text analysis
    Scientific calculator
    Advanced calculations
    Tic Tac Toe
    Classic game
    Drag and Drop Application
    Interactive GUI
    Snake Game
    Addictive gameplay
    Resume Builder
    Professional resumes
    Student Management System
    Data organization
    Rock Paper Scissors
    Simple fun
    Hangman Game
    Word guessing
    Webcam
    Video capture
    Attendance Management System
    Record tracking
    Chess Game
    Strategic play
    Vehicle Rental Management System
    Rental operations
    Quiz App
    Educational quizzes
    Voting Management System
    Election processes
    Electricity Billing System
    Billing automation
    Online Shopping Cart
    E-commerce platform
    Online BookStore
    Book purchases
    Connect4
    Strategic gaming
    Event Management System
    Planning tool
    Puzzle Game
    Mind challenges
    Pacman Game
    Arcade classic
    Space Invaders Game
    Alien battle
    Breakout Game
    Brick smashing
    Tetris Game
    Block stacking
    Minesweeper Game
    Strategic uncovering
    ChatFx
    Real-time chat
    Chrome Dino Game
    Endless runner
    Web scraping
    Data extraction
    Text editor
    Document editing
    Tender Management System
    Bid handling
    Hotel Reservation System
    Booking management
    Train Ticket Reservation System
    Travel booking
    School Management System
    Educational admin
    Banking System
    Financial operations
    Restaurant Management System
    Food service
    Library Management System
    Book tracking
    Mail Sender
    Email tool
    2048 Game
    Tile merging
    Table Generator
    Grid creation
    Health Care Management System
    Patient records
    Energy Saving System
    Efficiency monitoring
    • Work Report
    • Email
    • Rewrite
    • Speech
    • Title Generator
    • Smart Reply
    • Poem
    • Essay
    • Joke
    • Instagram Post
    • X Post
    • Facebook Post
    • Story
    • Cover Letter
    • Resume
    • Job Description
    • Recommendation Letter
    • Resignation Letter
    • Invitation Letter
    • Greeting Message
    • Try more templates
    Feedback
  2. Java Examples - Programiz

    Java Tutorial - W3Schools

    Learn Java with simple explanations, practical examples, exercises, and challenges that help yo…

    W3School
    Java Programs - Java Programming Exampl…

    This page covers Java programming examples from basics like Fibonacci, Prime numbe…

    GeeksForGeeks
    Feedback
  3. Java is a versatile and widely-used programming language that can be applied to various domains such as mobile apps, web apps, desktop apps, and games. Here are some basic and advanced Java code samples to help you get started and enhance your coding skills.

    Basic Java Programs

    Hello World

    This is the simplest Java program that prints "Hello World" to the console.

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

    Add Two Integers

    This program adds two integers and prints the result.

    public class AddTwoIntegers {
    public static void main(String[] args) {
    int first = 10;
    int second = 20;
    int sum = first + second;
    System.out.println("The sum is: " + sum);
    }
    }
    Copied!

    Check Even or Odd

    This program checks if a number is even or odd.

    import java.util.Scanner;

    public class CheckEvenOdd {
    public static void main(String[] args) {
    Scanner reader = new Scanner(System.in);
    System.out.print("Enter a number: ");
    int num = reader.nextInt();
    if (num % 2 == 0)
    System.out.println(num + " is even");
    else
    System.out.println(num + " is odd");
    }
    }
    Copied!
    Feedback
  1. Java Tutorial - W3Schools

    Learn Java with simple explanations, practical examples, exercises, and challenges that help you build real skills step by step. Tip: Sign in to track your progress. Our "Try it Yourself" editor makes it easy to …

    Usage example
    public class Main { public static void main(String[] args) { System.out.println("Hello World"); }}
  2. Java Programs - Java Programming Examples

    Sep 25, 2025 · This page covers Java programming examples from basics like Fibonacci, Prime numbers, Factorials and Palindromes to advanced topics such as …

  3. Java Coding Samples - University of Texas at Austin

    Includes examples on finding space taken up by files in a directory including all files in all subdirectories, recursive factorial, recursive power, recursive Fibonacci numbers, and a simple knapsack problem.

  4. Java Basic Programming Exercises - w3resource

    Jun 7, 2016 · Practice with solution of exercises on Java basic: examples on variables, date, operator, input, output and more from w3resource.

  5. 100+ Java Programs for Practice

    100+ Java Programs – Welcome to the 100+ Java Programs for Practice — a comprehensive collection of Java coding examples designed for students, …

  6. CodeJava.net - Java Tutorials, Code Examples and Sample Projects

    Learn Java programming from beginner to advanced level with hundreds of tutorials, guides, code examples and sample projects. Find videos, courses and certifications to boost your Java skills.

  7. Java Program Examples - Tutorial Gateway

    This article includes various Java programs covering all the topics such as control statements, strings, arrays, loops, classes, functions, matrices, etc. Before going …

  8. 10 Java code examples for 2025: from basic to JSP and …

    Jul 4, 2025 · Let’s learn 10 of the most useful Java code examples that would assist in writing, testing, and understanding Java code with clarity.

  9. Java Code Samples: A Comprehensive Guide - javaspring.net

    Jan 16, 2026 · Java code samples are invaluable resources for learning and mastering the Java programming language. By understanding the fundamental concepts, usage methods, common …