Advertisement
dxvmxnd

пенисы

Feb 28th, 2025 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1.                     try {
  2.                         // создание класса по имени
  3.                         Class<?> clazz = Class.forName(className);
  4.                         // бебрация конструктора с параметрами double, double, double, double
  5.                         Constructor<?> constructor;
  6.                        
  7.                         constructor = clazz.getDeclaredConstructor(double.class, double.class, double.class, double.class);
  8.  
  9.                         //  бабахаем экземпляр класса
  10.                         Object instance;
  11.                         instance = constructor.newInstance(num1, num2, num3, num4);
  12.  
  13.  
  14.                         showDialog.dispose();
  15.                         // выZOV метода
  16.                         Method showGraph = clazz.getMethod("showGraph");
  17.                         showGraph.invoke(instance);
  18.                     } catch (Exception e1) {
  19.                         e1.printStackTrace();
  20.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement