-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
11.0.1
-
x86_64
-
windows_7
A DESCRIPTION OF THE PROBLEM :
According to JEP 30 "https://openjdk.java.net/jeps/330
"The source file should contain one or more top-level classes, the first of which is taken
as the class to be executed."
But the second top level class/application is run.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Some error message.
ACTUAL -
Hello John
---------- BEGIN SOURCE ----------
package java11;
public class Hello2{
public void hello(String name){
System.out.println("Hello "+name);
}
}
public class Hello {
public static void main(String[] argv){
Hello hello=new Hello();
hello.hello(argv[0]);
}
public void hello(String name){
System.out.println("Hello "+name);
}
}
---------- END SOURCE ----------
According to JEP 30 "https://openjdk.java.net/jeps/330
"The source file should contain one or more top-level classes, the first of which is taken
as the class to be executed."
But the second top level class/application is run.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Some error message.
ACTUAL -
Hello John
---------- BEGIN SOURCE ----------
package java11;
public class Hello2{
public void hello(String name){
System.out.println("Hello "+name);
}
}
public class Hello {
public static void main(String[] argv){
Hello hello=new Hello();
hello.hello(argv[0]);
}
public void hello(String name){
System.out.println("Hello "+name);
}
}
---------- END SOURCE ----------