Tools
Log in
English

Learn to code

Learn classes, encapsulation and project layout with line-by-line examples.

JavaBased on Java 17Follow classes, encapsulation, inheritance and polymorphism one example at a time, then build a Maven or Gradle skeleton.Classes and objectsEncapsulationInheritancePolymorphismAbstractionComposition and staticAccess modifiersProject structureOpenPythonBased on Python 3.12Follow classes, encapsulation, inheritance and duck typing with examples you can run in the browser, then build a src-layout project.Classes and objectsEncapsulationInheritancePolymorphismAbstractionComposition and class variablesNaming and accessProject structureOpenPHPBased on PHP 8.3Follow classes, encapsulation, traits and enums with examples you can run in the browser, plus security basics, a Composer project skeleton and four small PHP tools.Classes and objectsEncapsulationInheritancePolymorphismAbstractionComposition, static, traits, enumsAccess modifiersProject structureOpenC#Based on C# 12Follow classes, properties, inheritance, pattern matching and records through examples, then build a .NET solution with .sln and .csproj files.Classes and objectsEncapsulationInheritancePolymorphismAbstractionComposition, static, recordsAccess modifiersProject structureOpenSwiftBased on Swift 6.4Follow structs, classes, optionals and protocols in Swift, the language of Apple apps, then build a Swift package or a SwiftUI app (MVVM) skeleton.Classes and objectsEncapsulationInheritancePolymorphismAbstractionComposition, static, ARCAccess controlProject structureOpen
Compare languagesOne table for how types, classes, access control, exceptions and build tools differ.Server port guideCommon port numbers with the service, what it does, Windows, Linux and Unix packages, and check commands.Security checkPHP2SHELL and other RCE CVEs, a fresh CVE list, free Linux and Windows checks and a fix guide for each finding.

Where the five languages come from

LanguageMade byFirst releaseUsed mostly for
JavaSun Microsystems (USA), a team led by James GoslingAnnounced 1995 · JDK 1.0 in January 1996Business back ends, Android apps, big-data processing
PythonCWI (Netherlands), Guido van Rossum0.9.0 in February 1991 · 3.0 in December 2008Data analysis, machine learning, web back ends, automation
PHPRasmus LerdorfPHP Tools in June 1995 · PHP 3 in 1998Websites, online shops, WordPress, admin screens
C#Microsoft (USA), design led by Anders HejlsbergC# 1.0 in January 2002 · ECMA-334 standard (December 2001)Windows apps, web servers and APIs, Unity games, cloud
SwiftApple (USA), started by Chris LattnerAnnounced June 2014 · Swift 1.0 in SeptemberiPhone, Mac and Apple Watch apps, SwiftUI screens

What a topic page contains

  1. A one-line meaning, why you need it and an everyday picture to get the idea first.
  2. The example code with its class diagram and output next to it.
  3. A Next button that moves one line at a time and shows how variables change.
  4. Common mistakes, with the wrong code and the fixed code side by side.
  5. Two short questions at the end to check yourself.

How to read the step-through

Each press of Next moves the bright bar to the line that just ran. The value box shows variables after that line, with changed values in a different color. Lines that print something light up in the output box.

When a line calls a method, the bar jumps into that method and comes back to the caller afterwards.

How to read the class diagrams

The top of a box is the class name, the middle holds fields and the bottom holds methods. A hollow triangle arrow means inheritance (extends), a dashed one means implements, and a line with a diamond means one class keeps the other in a field (has a).

Signs before names: + public · - private · # protected · ~ no modifier

Project structure

Pick a program type and a build tool, and the folder tree and starter files appear right away. Read what each file does, then download the zip and build it.

Questions people ask

Is it free? Do I need an account?

It is free, and every page works without signing up.

Which languages can I learn here?

Java, Python, PHP, C# and Swift. Each topic has an example, a line-by-line step-through, a class diagram and two questions, and one table compares the languages.

Can I run code on the page?

Python and PHP run right in your browser when you press Run. For Java, C# and Swift you see output we produced beforehand on our server, so run edited code on your own computer.