S
Shawn
Hi,
I am unclear about the following two ways to initialize instance variables.
public class MyClass
{
private int num = 9;
...
}
public class MyClass
{
private int num;
public MyClass()
{
this.num = 9;
}
}
What is the difference between the two? What is the consequence?
Thank you very much.
I am unclear about the following two ways to initialize instance variables.
public class MyClass
{
private int num = 9;
...
}
public class MyClass
{
private int num;
public MyClass()
{
this.num = 9;
}
}
What is the difference between the two? What is the consequence?
Thank you very much.