3 ms·
It is exactly the same isn't it?
by chvid 8y ago
It is exactly the same isn't it?
- dmitriid 8y agoIt's not. C#'s switch can pattern match on value and type: https://blogs.msdn.microsoft.com/dotnet/2019/01/24/do-more-with-patterns-in-c-8-0/ https://blogs.msdn.microsoft.com/dotnet/2019/01/24/do-more-w... Java's switch still operates only on String, int, short, byte, char, and their wrapper types: https://blog.codefx.org/java/switch-expressions/ https://blog.codefx.org/java/switch-expressions/