Javatpoint Logo

91-9990449935

 0120-4256464


what sets the values of class variables ?

By: nileshpadm@gmail.com On: Tue Jun 14 16:54:01 IST 2016     0 0 0  0
if default constructor sets values of class variables, please check below example-

1> First take one class , say A
class A {
int x;
String str;
boolean b;

A() {
}

2> In this class ,i have specified a default constructor (but did not initialized the values of variables)

so exactly what initializes the values of class variables ?
0



PLEASE REPLY

Please login first to post reply. Login please!