Let\'s imagine we have the following classes:
public class Message extends Object {} public class Logger implements ILogger { public void log(Message m) {/
I don't think java compiler will remove the call because the called method is empty, because you can change the method in future also without making any change in the main method.