Created new branch named branch-1. changes made to Main.java

Please review the code and merge it with the master or else let me know if the code is not what you expected. Thank you