C
#include <stdio.h>
int main(int argc, const char * argv[]) {
printf("Hello, World!\n");
return 0;
}
Objective-C
#import <Foundation/Foundation.h>
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
<?php echo '<p>Hello World!</p>'; ?>
Keep Learning …
网友评论