import org.w3c.dom.Node;
public class ListExample {
public final class Node<T> {
public final T value;
public Node<T> next;
public Node(T _value) {
this( _value, null );
}
public Node(T _value, Node<T> _next) {
value = _value;
next = _next;
}
@Override
public String toString() {
return "" + value;
}
}
public static Node<Character> getUppercaseList(Node<Character> head) {
Node<Character> tail = null;
Node<Character> result = null;
while(head != null) {
}
return null;
}
}
感谢您的帮助!
答案 0 :(得分:0)
遍历字符列表,构建一个大写字母列表。如果您使用的是Java8,请过滤isUpperCase()
方法。