This might be a super-lame lazy question.
Is it possible to generate constructor in Eclipse like
class A{
int a;
String b;
float c;
/* Is it possible to auto-generate this*/
public A() {
a = 0;
b = "";
c = 0f;
}
}
I am aware that default initialization would any case take care of this but I need a code auto-generated like this so that I can change the default value of say int as 5 and float as 3 and so on.
If this is not available then the next best option would be generate constructor using fields and then converting it to this.
To achieve this, set the fields when you declare them: