Curly brackets for constructor


#1

class Car{
public static void main(String Args[]) {
}

public Car() { //Constructor
}

So whats the need the curly brackets for the constructor?


#2

Hi there.

I believe they're there just to explicitly show that it is the constructor. Nothing else.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.