Advice for which foreign language to take in college?

So I am trying to plan courses for college and I need to take foreign language courses to graduate. I am going to major in CS and minor in either math or film. I was thinking of choosing Japanese because that is where a lot of tech is developing but China will soon have the highest GDP so I was thinking of choosing Chinese. I have heard that both of these languages are hard and that CS on its own is a hard major so this may not be the best option. I also took Spanish in high school (not till AP or subject test so can’t test out of it) so I could take that instead as well (also pretty useful to know since I plan on staying in the US for all of my life). I am willing to put in the work for Chinese/Japanese and could start to study before college starts (like in the summer or something idk). I just want their to be value in whatever language I take, I would even consider taking a semester abroad.

Since you took high school Spanish, you may be able to get placement higher than college Spanish (semester) 1, depending on your college’s placement procedures and testing. However, since college foreign language courses move faster than in high school, you may find that second year (or even more) of high school Spanish only advances you one semester in college Spanish.

For an English speaker (who does not already have some knowledge of the target language or a more closely related one), to reach the same level of proficiency will probably take more semesters of Chinese or Japanese than for Spanish. The DLI courses ( https://www.dliflc.edu/about/languages-at-dliflc/ ) in Chinese and Japanese are 64 weeks, compared to 36 weeks for Spanish; if the time to proficiency ratio is similar in regular college courses, you would need the seventh semester of Chinese or Japanese to reach a level of proficiency in one of those languages similar to the proficiency in Spanish after the fourth semester of that language.

I’ve always thought that Spanish (domestic) and Chinese/Mandarin (international) would be the best foreign languages to learn for the future.

Spanish will certainly be easier, but putting in the work for Chinese May pay off in the long run.

Spanish can also be useful internationally (Latin America and Spain, plus some mutual intelligibility with Portuguese).