This is my question; is possible to use two languages such as Java and C++ or Perl and C++ for the same program? For example, main function writen in C++ and other functions such as player's movement writen in Java. Is that possible?

Thanks!

PS: Sorry for mi bad english D: