Sorry, if this question is trivial...
There are two ways of initializing fields
For example:
The first way is:
Public class A{
int a;
A(){
a = 5;
}
}
The second way is:
Public class A{
int a = 5;
A(){
}
}
Which way is better? Why or why not?