Main Java Version 1