Skip to main content
deleted 8 characters in body
Source Link

JAVA using reflection

 public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    Golf golf = new Golf();
        golf.notALoop();
    }

    static class Golf{
 
        public void notALoop() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
            System.out.println("Its not directly calling it self");
            Method method = this.getClass().getMethod("notALoop");
            method.invoke(this);
        }
 
        }

JAVA using reflection

 public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    Golf golf = new Golf();
        golf.notALoop();
    }

    static class Golf{
 
        public void notALoop() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
            System.out.println("Its not directly calling it self");
            Method method = this.getClass().getMethod("notALoop");
            method.invoke(this);
        }
 
    }

JAVA using reflection

 public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    Golf golf = new Golf();
        golf.notALoop();
    }

    static class Golf{
        public void notALoop() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
            System.out.println("Its not directly calling it self");
            Method method = this.getClass().getMethod("notALoop");
            method.invoke(this);
        }
        }
Source Link

JAVA using reflection

 public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    Golf golf = new Golf();
        golf.notALoop();
    }

    static class Golf{

        public void notALoop() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
            System.out.println("Its not directly calling it self");
            Method method = this.getClass().getMethod("notALoop");
            method.invoke(this);
        }

    }