fork download
  1. public class Main {
  2. public void foo() {
  3. }
  4.  
  5. public class A {
  6. public void foo(String s) {
  7. }
  8.  
  9. public void test() {
  10. foo();
  11. }
  12. }
  13.  
  14. public static void main() {
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:10: error: method foo in class Main.A cannot be applied to given types;
            foo();
            ^
  required: String
  found: no arguments
  reason: actual and formal argument lists differ in length
1 error
stdout
Standard output is empty