Hello World

C

#include 

int main(int argc, const char * argv[]) {
    printf("Hello, World!\n");
    return 0;
}

Objective-C

#import 

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSLog(@"Hello, World!");
    }
    return 0;
}

Swift

import Foundation

print("Hello, World!")

Java

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

JavaScript

#!/usr/local/bin/node

var http = require( "http" );
http.createServer( function ( request, response ) {
  response.writeHeader( 200, {
    "Content-Type": "text/html"
  } );
  response.write( "Hello World!" );
  response.end();
} ).listen( 8080 ); // Activates this server, listening on port 8080.

ASP

<%response.write "Hello World!"%>

PHP

Hello World!

'; ?>

Keep Learning …

你可能感兴趣的:(Hello World)