help w/ this program

can someone tell me whats wrong with this program? It's in my programming book and i can't get it to work.

class Sundae {

private Sundae() {}

static Sundae makeASundae() {

return new Sundae();

}

}

public class IceCream {

public static void main(String[] args) {

Sundae x = new Sundae.makeASundae();

}

}

I end up getting one of these things ^ under the period in Sundae.makeASundae(). Can you help me?

[495 byte] By [java198] at [2007-9-26 1:19:49]
# 1
no new needed, Sundae x = Sundae.makeASundae();> Sundae x = new Sundae.makeASundae();
mchan0 at 2007-6-29 0:52:50 > top of Java-index,Archived Forums,Java Programming...
# 2
you are calling a static method, so you should not do : Sundae x = new Sundae.makeASundae();but do:Sundae x = Sundae.makeASundae();insteadcheers
esmo at 2007-6-29 0:52:50 > top of Java-index,Archived Forums,Java Programming...
# 3
thanks, now it work perfect.
java198 at 2007-6-29 0:52:50 > top of Java-index,Archived Forums,Java Programming...