I agree with your analogy. It just so happens that Java is commonly taught as a first programming language and most people manage just fine with the class boilerplate even if they don't really understand it yet.
Yet the burden in C# and Java was consider enough of an issue versus languages like Python, JavaScript, Go, that both platforms are reducing the hello world boilerplate.