This functionality has been there since API 19.0 so you don't really need to write any code for this.
If you still have a use case which warrants handling the dependent picklist behavior through your Apex code, I'd recommend you go through this tutorial on how to do so.
This functionality has been there since API 19.0 so you don't really need to write any code for this.
If you still have a use case which warrants handling the dependent picklist behavior through your Apex code, I'd recommend you go through this tutorial on how to do so.
http://blog.deadlypenguin.com/blog/2012/07/09/dynamic-dependent-picklists-in-salesforce/
Best Regards
NagaKiran