@@ -0,0 +1,1119 @@
+package com.javarush.task.task21.task2102;%0A%0Aimport java.lang.reflect.Method;%0Aimport java.lang.reflect.Modifier;%0A%0A/* %0A%D0%A1%D1%80%D0%B0%D0%B2%D0%BD%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC %D0%BC%D0%BE%D0%B4%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%82%D0%BE%D1%80%D1%8B%0A*/%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) %7B%0A        int modifiersOfThisClass = Solution.class.getModifiers();%0A        System.out.println(isAllModifiersContainSpecificModifier(modifiersOfThisClass, Modifier.PUBLIC));   //true%0A        System.out.println(isAllModifiersContainSpecificModifier(modifiersOfThisClass, Modifier.STATIC));   //false%0A%0A        int modifiersOfMethod = getMainMethod().getModifiers();%0A        System.out.println(isAllModifiersContainSpecificModifier(modifiersOfMethod, Modifier.STATIC));      //true%0A    %7D%0A%0A    public static boolean isAllModifiersContainSpecificModifier(int allModifiers, int specificModifier) %7B%0A        return allModifiers==specificModifier;%0A    %7D%0A%0A    private static Method getMainMethod() %7B%0A        Method%5B%5D methods = Solution.class.getDeclaredMethods();%0A        for (Method method : methods) %7B%0A            if (method.getName().equalsIgnoreCase(%22main%22)) return method;%0A        %7D%0A%0A        return null;%0A    %7D%0A%7D%0A

Task --> 2102