You can do the same[1] with .Net Core for those of us who like that.
[1]: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...
dotnet was always really good for this. There were a bunch of third party tools that have done this since the 90s like toolsack.
I think Java can run uncompiled text scripts now too
That's explicit support rather than using the same // hack. The language is specifically ignoring a shebang even though it doesn't match the usual comment syntax.