You can do this if you put your printing code inside an initialization block. This will get executed once for every instance,
before the constructor runs. For example:
class A {
int a = 1;
{ // open initialization block
System.out.println(" a is "+a);
System.out.println();
} // close initialization block
void cal() {
int b = 2;
System.out.println(" b is " + b); //working fine
}
}
This is not recommended practice unless you have a good reason for doing it, and in my experience, is rarely, if ever necessary.