我可能很傻,但它让我疯了.我已经四处寻找,但我对编程比较陌生,而且我已经掌控了.如果可以的话请帮忙!bar参数是一个arraylist.toArray(),它只是字符串.
public bar(Object[] contents) {
for (Object o : contents) {
String s = (String) o;
if (s == null) {
System.out.println("newline"); //checking
} else {
try {
arrayContents.add(new line(s));
} catch (Exception ex) {
System.out.println("error printing note: " + s + " " + ex + " in bar " + i);
}
}
i++;
}
// System.out.println(arrayContents);
}
Run Code Online (Sandbox Code Playgroud) 我不确定这是做什么的,我以前没见过,也找不到任何有关它的信息.
private static String[] names = { "A.ttf" };
private static Map<String, Font> cache = new ConcurrentHashMap<String, Font>(names.length);
static {
for (String name : names) {
cache.put(name, getFont(name));
}
}
Run Code Online (Sandbox Code Playgroud)