Hello World in 10 Programming Languages




Java Hello World


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

Click here to see this code run



HTML5 Hello World


<!DOCTYPE html>
<html>
    <head>
        <title>Page Title</title>
    </head>
    <body>
        <h1>Hello World</h1>
    </body>
</html>

Click here to run this code



Python Hello World


print("Hello World")

Click here to see this code run



C Hello World


#include <stdio.h>

int main() {

printf("Hello World");
    
return 0;}



C++ Hello World


#include <iostream>

using namespace std;

int main() {

cout << "Hello World";

return 0;}

Click here to see this code run



C# Hello World


namespace HelloWorld { 

class Hello { 

static void Main(string[] args) {

System.Console.WriteLine("Hello World"); } } }

Click here to run this code



Ruby Hello World


puts "Hello, World!"

Click here to run this code




PHP Hello World


<?php

echo "Hello World";
    
?>

Click here to see this code run



Swift Hello World


import Swift 

print("Hello World")

Click here to run this code



Kotlin Hello World


fun main(args: Array<String>) {

println("Hello World") } 

Click here to see this code run



More Free Code Examples:


Java Current Time and Date Program


JavaScript Substitution Cipher


Java Odd or Even






Comments

  1. JavsSctipt example is wrong! It shows html example only!

    ReplyDelete
    Replies
    1. Thanks for noticing i missed that I have corrected the issue.

      Delete

Post a Comment

Popular posts from this blog

Crypto Mining

Multi-tap Keypad Text Entry