fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Test
  6. {
  7. int eat() { return 1; }
  8. }
  9.  
  10. class TestChild
  11. {
  12. void eat(int apples) {}
  13. }
  14.  
  15. class Ideone
  16. {
  17. public static void main (String[] args) throws java.lang.Exception
  18. {
  19. TestChild tc = new TestChild();
  20. int n = tc.eat();
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:23: error: method eat in class TestChild cannot be applied to given types;
		int n = tc.eat();
		          ^
  required: int
  found: no arguments
  reason: actual and formal argument lists differ in length
1 error
stdout
Standard output is empty