admin on November 1st, 2007

/**
 * @author R
 * 1+2+3+4 …. + 99+100 = 5050
 */
public class Main {
    /** Creates a new instance of Main */
    public Main() {} 

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        System.out.println(recursiveAdd(100));
    }

    public [...]

Continue reading about Java simple recursion

admin on November 1st, 2007

Elements way is good at interoperability.
Attributes way is good at size of the XML.

<message>
     <id>1</id>
     <myword>Hello</myword>
</message>

<message id=”1″>
     <myword>Hello</myword>
</message>

<message id=”1″>Hello</message>

<message id=”1″ myword=”Hello” />

Which way do you prefer?

Continue reading about XML Elements or Attributes in the world