2007/06/13(水)C++

2007/06/13 16:44 Hello World

C++

#include <iostream>
using namespace std;

int main(void)
{
	cout << "Hello World!" << endl;
	return 0;
}

C++ 別Ver.

#include <iostream>
using namespace std;

class HelloWorld
{
public:
	HelloWorld(){
		cout << "Hello World" << endl;
	}
};

HelloWorld hello;
int main(){}

2007/05/24(木)Java

2007/05/24 0:14 Hello World

Java

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

Servlet

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloWorld extends HttpServlet{
  public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException, ServletException{
    
    out.print("HelloWorld!");
  }
}

JSP

<html>
  <head>
    <title>HelloWorld!</title>
  </head>
  <body>
    <%="HelloWorld!" %>
  </body>
</html>