In Scala or other JVM language, which type declaration is closest to a type declaration nested in a generic class in C# or C++?
(this is the Scala version, for Rust version, please go to In Rust, which type declaration is closest to a type declaration nested in a generic class in C# or C++?)