Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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);
    }
}