I was wondering if it is allowed to create an instance of a class inside another class.
Or, do I have to create it outside and then pass it in through the constructo
People saying that it is possible to 'create a class within a class' seem to mean that it is possible to create an object / instance within a class. I have not seen an example of an actual class definition within another class definition, which would look like:
class myClass{
class myNestedClass{
}
}
/* THIS IS NOT ALLOWED AND SO IT WON'T WORK */
Since the question was 'is it possible to create a class inside another class', I can now only assume that it is NOT possible.