在Java中,删除容器中的一个组件的方法是? A. add(Component comp) B. getComponentCount() C. getComponent(int n) D. remove(Component comp) 答案解析 根据Java面向对象程序设计中的容器主要方法,删除容器中的一个组件的方法是remove(Component comp)。 正确答案:D