Languages like Java are awful in that respect, as they make it super hard to declare new types.
People expect for a type to contain some logic, but it doesn't have to. e.g. a configuration is a type that contains other types that contains yet other types. But I have never seen it done like that in languages like Java.