Here is an example I read today:
class HDFC implements Bank{
private final String BNAME;
public HDFC(){
BNAME="HDFC BANK";
}
public String getBankName() {
return BNAME;
}
}
if it is me, I probably would create like this:
class HDFC implements Bank{
private final String BNAME="HDFC BANK";
public String getBankName() {
return BNAME;
}
}
What's the difference between these two implementations? which one is more appropriate?