Click here to watch in Youtube :
https://www.youtube.com/watch?v=fuszw2oPFZM&list=UUhwKlOVR041tngjerWxVccw
VectorExample.java
Output
https://www.youtube.com/watch?v=fuszw2oPFZM&list=UUhwKlOVR041tngjerWxVccw
VectorExample.java
import java.util.Vector; /* * Example of remove(Object o) method. */ public class VectorExample { public static void main( String[] args ) { Vector<Integer> vector = new Vector<Integer>(); vector.add(10); vector.add(20); vector.add(30); vector.add(40); System.out.println("vector : " + vector + "\n"); /* * Removes the first occurrence of the specified element in this Vector * If the Vector does not contain the element, it is unchanged. */ Integer element = 30; boolean isRemoved = vector.remove(element); System.out.println("isRemoved : " + isRemoved); System.out.println("vector : " + vector + "\n"); } }
vector : [10, 20, 30, 40] isRemoved : true vector : [10, 20, 40]
To Download VectorDemoRemoveObject Project Click the below link
https://sites.google.com/site/javaee4321/java-collections/VectorDemoRemoveObject.zip?attredirects=0&d=1
See also:
ReplyDeleteWhen you enter this app you can see that Remove Object & Remove BG of Photo interface is very simple and easy to use