You need to sign in to do that
Don't have an account?
Ritik
Property is defined in a class taking class name as the dataType for list.
Hello,
Can somebody tell me that is below piece of code is correct or not.
And if it is incorrect then let me know with the help of reason(s)
public class className01 {
public List<className01> cn;
}
In short a vaiable/property is defined in a class taking class name as the dataType for list.
Regards,
Ritik
Can somebody tell me that is below piece of code is correct or not.
And if it is incorrect then let me know with the help of reason(s)
public class className01 {
public List<className01> cn;
}
In short a vaiable/property is defined in a class taking class name as the dataType for list.
Regards,
Ritik
Rufus Roden
That's fine. It might seem odd that it's defined inside the very class type that it's referencing but it's not a problem.