/** *@author :CandidJava.com *@descriptions : This program explain the function and use of removeElementAt() */ import java.io.*; import java.util.*; public class RemoveElementAt { public static void main(String arg[])throws Exception { Stack s=new Stack(); //to create object for Stack class s.add(50); //to add an element in Stack s.add(60); //to add an element in Stack s.add(70); //to add an element in Stack s.add(80); //to add an element in Stack System.out.println(s); s.removeElementAt(2); // Removes element at the specified index System.out.println("After removing"); System.out.println(s); } }
Stack Example Program for removeElementAt(int index)
CANDID INDUSTRIAL TRAINING -- CHENNAI |
Corporate Training for Experienced Candidate |
Struts | Hibernate | Spring | Java / J2EE |
SOAP | RestFull | Design Pattern | more... |
Ph: +91 72000 69003 137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044 |
OUTPUT:
Filed in: Z-A All Java Codes