CompositeName: remove(int posn) : CompositeName « javax.naming « Java by API






CompositeName: remove(int posn)

 

import javax.naming.CompositeName;

public class Main {
  public static void main(String[] argv) throws Exception {

    CompositeName composite = new CompositeName("cn=John,o=hits/summary.txt");
    String first = composite.get(0);
    String last = composite.get(composite.size() - 1); 

    composite.add(0, "yourname.com"); 
    composite.remove(2); 
  }
}

   
  








Related examples in the same category

1.new CompositeName(String n)
2.CompositeName: add(int posn, String comp)
3.CompositeName: get(int posn)