Есть вот такой код, задачу я решил, но можете пожалуйста объяснить чем ______________________________________________________ private static List<String> strings; public static void main(String[] args) throws Exception { strings = new ArrayList<String>(); Отличается от public static void main(String[] args) throws Exception { ArrayList<String> strings = new ArrayList<String>(); Задача компилируется и так и так ______________________________________________________ public class Solution { private static List<String> strings; public static void main(String[] args) throws Exception { ArrayList<String> strings = new ArrayList<String>(); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int a = 0; for(int i = 0; i < 5; i++){ strings.add(reader.readLine()); a = (strings.get(i).length() > a) ? strings.get(i).length() : a ; } for(String s : strings){ if(s.length() == a) System.out.println(s); } } }