Let's say that the data type I insert into BST is TypeT. I want to create a BST that can works similarly with either String and Integer data types. I tried to convert TypeT into String and then I used compareTo method in the String class.
But compareTo method doesn't works as I expected for example;
When I run this line ---> System.out.println("5".compareTo("10"));
It outputs 4,what I was expecting was -1 because 5<10