Lort533
Lort533
JCHJava Community | Help. Code. Learn.
Created by Lort533 on 1/23/2025 in #java-help
Overwriting a declared method?
Hello, I'm messing with something Java based, I want to modify it a bit. My code is simply this:
Method xyzMethod = XYZ.class.getDeclaredMethod("a", int.class, int.class, int.class, int.class, Random.class);
Method xyzMethod = XYZ.class.getDeclaredMethod("a", int.class, int.class, int.class, int.class, Random.class);
Now the issue is that unlike the Field class, Method doesn't seem to have a set method. So, if I wanted to override this function - how?
10 replies