Main seperated in java code