import java.util.*;import java.lang.*;import java.io.*; class Test{ int eat() { return 1; }} class TestChild{ void eat(int apples) {}} class Ideone{ public static void main (String[] args) throws java.lang.Exception { TestChild tc = new TestChild(); int n = tc.eat(); }}
Standard input is empty
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
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!