ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  The PHP Scalability Myth
Subject:   Dude's right!
Date:   2003-10-18 01:23:46
From:   anonymous2
Response to: Dude's right!

Not to be disrespectful, but I do think you left out a few things.
For just a terminal


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



For an Applet
import java.applet.Applet;
import java.awt.Graphics;


public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}


For a Java Bean
package org.acme;


import java.rmi.RemoteException;
import javax.ejb.*;


public class HelloBean implements SessionBean {
private SessionContext sessionContext;
public void ejbCreate() {
}
public void ejbRemove() {
}
public void ejbActivate() {
}
public void ejbPassivate() {
}
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
}
public String sayHello() throws java.rmi.RemoteException {
return "Hello World!!!!!";
}
}



1 to 1 of 1
  1. Dude's right!
    2003-10-19 00:32:44  anonymous2 [View]

1 to 1 of 1