public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		ArrayStack<Integer> temp = new ArrayStack<Integer>(15);

	      Integer[] h= new Integer[3];
	    		 h[0]=8;
	    		 h[1]=9;
	    		 h[2]=10;
	    System.out.println("Add elements:");
	    for(int i = 0; i <8; i++) temp.add(i);
	    temp.addAll(h);
	    System.out.println(temp.toString());
	    System.out.println("Delete last element:");
	    temp.remove();
	    System.out.println(temp.toString());
	    System.out.println("Empty? "+temp.isEmpty());
	    System.out.println("Size: "+temp.size());
	        
	    System.out.println("Get element with index 3: "+temp.get(3));
	   Iterator iter = temp.iterator();
	       
	   System.out.println("Print array after deleting seventh element:");
         for (int i=0; i<6; i++)
        {
	     System.out.println(iter.next());
        }
       
	    iter.remove();
	
	    while (iter.hasNext())
	    {
        System.out.println(iter.next());
	    }
	
	    System.out.println("Size: "+temp.size());
	    System.out.println("First element: "+temp.peek());
	    System.out.println("Clear array");
	    
	    temp.clear();
	    System.out.println("Empty? "+temp.isEmpty());
	    System.out.println(temp.toString());
	    System.out.println("Size: "+temp.size());
	    System.out.println("The attempt to remove last element:");
	    temp.remove();
	 
	}