Trim Y's values, if size greater than X's size

- Trim Y's size if greater than X's Size & throw exception if fails.
- Changed to Enhanced For-Loop.