Suppose I initialize class members as follows:
class A
{
public int i=4;
public double j=6.0;
}
Does the compiler create a default constructor in this situation?
In general, I know that a constructor can initialize the value of class instance variables and can also perform some other initialization operations corresponding to the class. But in the above example, I initialized the value ialso joutside the constructor. In this situation, is the compiler still generating a default constructor? If so, what does the default constructor do?
source
share