How the comapre() method without calling in main method? :     enter code here
import java.util.*;

class MyComp implements Comparator<String>{<br/>
	public int compare(String aStr, String bStr) {<br/>
		return bStr.compareTo(aStr);<br/>
	}
}<br/>
public class CustomComparatorTest {

	public static void main(String[] args) {

		MyComp my = new MyComp();
		TreeSet<String> ts = new TreeSet<String>(my);
		ts.add("C");
		ts.add("A");
		ts.add("B");
		ts.add("Y");
		ts.add("T");
		ts.add("W");
		
		for(String element : ts)
		{
			System.out.println(element + " ");
		}
		System.out.println();
	}
}

