Monday, May 31, 2010

What is the difference between constructor and method?

I have updated in http://www.freejavaclass.com/

Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.

No comments:

Post a Comment

How can instantiate Java interface without implementing.

public interface Foo { String method(); } public class Claaa {    public static void main(String[] args) {     Foo fooByIC...