So, I wanted to test the Void type, then I wrote this simple program:
package ehsan; public class NumTest { public static Void main(String[] args) { System.out.println("Hello, World!"); return null; } }
So, now that I want to compile, the compiler complains:
main method must return a value of type void
Why does the compiler not see that I am not returning anything and using Void ?
user6538026
source share