BAEL-3929: added another example per code review.

This commit is contained in:
Tyrell Flurry 2020-04-14 17:59:28 -04:00
parent dcb65ba8bc
commit b14ab5ed7a
2 changed files with 17 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import java.util.Map;
import org.slf4j.LoggerFactory;
public class Main {
public static void main(String[] args) {
Map<String, String> map = new HashMap<>();
map.put("Dallas", "Texas");
@ -15,4 +16,5 @@ public class Main {
LoggerFactory.getLogger(Main.class)
.info("Map: {}", map);
}
}

View File

@ -0,0 +1,15 @@
package com.baeldung;
public class ReflectionMain {
public static void main(String[] args) {
ClassLoader classLoader = Main.class.getClassLoader();
try {
System.out.println(classLoader.loadClass("org.apache.commons.collections.CollectionUtils")
.getSimpleName());
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}