example8_4.java

来自「《Java程序设计与应用》-张仕斌-源程序 《Java程序设计与应用》-张仕斌」· Java 代码 · 共 45 行

JAVA
45
字号
/*
 * Example8_4.java
 *
 * Created on 2006年9月16日, 上午10:58
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package example8_4;
import java.lang.System; 
import java.util.Vector; 

/**
 *
 * @author Administrator
 */
public class Example8_4 {
    
    /** Creates a new instance of Example8_4 */
    public Example8_4() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
 		Vector v=new Vector();
		v.addElement("one");
           //     for(int i=0;i<v.length();i++)
             //   {
                    System.out.println(v);
               // }
		v.addElement("two");
 		v.addElement("three");
 		v.insertElementAt("zero",0);
 		v.insertElementAt("oop",3); 
 		v.setElementAt("three",3); 
 		v.setElementAt("four",4);
 		v.removeAllElements(); 
    }
    
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?