Hello guys,
This is my first post in the forum, and definetly not the last
I have a doubt on the downcasting concept. I am trying to convert Object to String.
Object obj = new Object();
String s = obj; // This throws compilcation error.
To prevent the compilation error I change the code to
String s = (String) obj ; // Downcasting ...
But then i get a runtime error for class cast exception.
In that case how can i ever cast a parent to child, and does the downcast concept really work?
Any help appreciated

.
Sorry for posting it here. First time user
Thanks
Tushar.