TAIPEI, Aug 12 (Reuters) - Taiwan's Foxconn, the world's largest contract electronics maker, reported on Wednesday a 35% ‌rise in second-quarter profit, beating analyst forecasts, on ‌continued strong demand for AI, which it predicted would drive growth this ​year. In an earnings release, it stuck to its previous forecast of "strong" ⁠growth for revenue this year and said it also saw strong AI demand driving growth throughout the year. Foxconn, formally ​called Hon Hai Precision Industry, ‌in July reported a 40% year-on-year jump in second-quarter revenue. The company ‌is also building factories in ​Mexico and Texas to make AI ​servers for Nvidia. Foxconn shares closed 2.7% higher on Wednesday ahead of ​the earnings release.