Skip to content

Conversation

@paramsiddharth
Copy link
Contributor

Add a new template for Java

Resolves #68: Add a sensible default template (Java)

Modifications

  • Replaced the default Java template with a more regular template used in Java console programmes.
  • Added throws Exception to the main method so that exceptions in general are thrown for any library/module used.
    ...
    public static void main(String[] args) throws Exception {
    ...
  • Name the class "Solution" by default.
  • Initialize BufferedReader and Scanner objects for input operations.

Additional Points

  • A comment has been added asking the user to change the class name as needed. This may later be modified to name the classes by problem identifiers.
  • Import statements for generally used libraries have been added. This would be the Java equivalent of bits/stdc++.h in competitive programming, though some prefer having their own customized fast I/O setup.

@ankushbhardwxj
Copy link
Owner

@paramsiddharth - Looks good ! Thanks

@ankushbhardwxj ankushbhardwxj merged commit 99a95a6 into ankushbhardwxj:master Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a sensible default template (java)

2 participants