Can you write a method inside the main method? For example I found this code:
public class TestMax { public static void main(String[] args) { int i =
you cannot directly define methods inside other methods in Java ( main method too).
cannot directly define methods
You should write the method in the same class as main.
Note: You could declare a class with methods inside another method