M
MM
Hi,
I was taught to use this type of class/member construction (some years
ago I might add) -
class someclass
{
private datatype data1;
private datatype data2;
public someclass( datatype data1, datatype data2 etc)
{
this.data1 = data1;
this.data2 = data2;
etc...
but alot of modern texts seem to decry the use of 'this' to
prefix/access class memebers and don't even seem to bother with explicit
'private'. What's the 'norm' these days? Thanks!
I was taught to use this type of class/member construction (some years
ago I might add) -
class someclass
{
private datatype data1;
private datatype data2;
public someclass( datatype data1, datatype data2 etc)
{
this.data1 = data1;
this.data2 = data2;
etc...
but alot of modern texts seem to decry the use of 'this' to
prefix/access class memebers and don't even seem to bother with explicit
'private'. What's the 'norm' these days? Thanks!