I wonder why there is no error when writing the main
default method and executing it without passing any argument, even with the String[]args
as a parameter, eg:
package prueba;
class Prueba{
public static void main(String[]args){
System.out.print("Hola");
}
}
However, any Java API method you use requires you to pass default parameters to it, or it fails.