Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,4 @@
class Example {
String stringA = "rosetta";
private String stringB = "code";
}

View file

@ -0,0 +1,2 @@
Example example = new Example();
Field field = example.getClass().getDeclaredField("stringB");

View file

@ -0,0 +1 @@
field.setAccessible(true);

View file

@ -0,0 +1 @@
String stringB = (String) field.get(example);

View file

@ -0,0 +1,6 @@
Example example = new Example();
Field field = example.getClass().getDeclaredField("stringB");
field.setAccessible(true);
String stringA = example.stringA;
String stringB = (String) field.get(example);
System.out.println(stringA + " " + stringB);

View file

@ -0,0 +1,7 @@
class Example {
String stringA = "rosetta";
private String stringB() {
return "code";
}
}

View file

@ -0,0 +1,6 @@
Example example = new Example();
Method method = example.getClass().getDeclaredMethod("stringB");
method.setAccessible(true);
String stringA = example.stringA;
String stringB = (String) method.invoke(example);
System.out.println(stringA + " " + stringB);