A collection of Java commands for optimizing modern Java development productivity.
apm install atom-java-snippetsFeel free to let me know (link) what else can be improved/added or you can also submit a PR.
Snippets are optimized to be short and easy to remember. Some snippets are "chainable" and render differently when preceded by a ".".
- [Control Flow](#Control Flow Snippets)
- [Classes](#Class Related Snippets)
- [Java Doc Comments](#Java Doc Comments Snippets)
- Miscellaneous
- [Return Values](#Returning Values Snippets)
- [Types](#Type Snippets)
if(${1:condition}) {
${2}
}$3else {
${1}
}$2if(${1:condition}) {
${2}
} else {
${3}
}$4else if (${1:condition}) {
${2}
}${3}for (Integer ${1:i} = 0; ${1:i} < ${2:iterable}${3:.length}; ${1:i}++) {
${4}
}${5}for(${1:object_type} ${2:var_name}: ${3:collection_name}) {
${4:var_name}
}$5while (${1:condition}) {
${2}
}$3try {
${1}
} catch(Exception ${2:exception_name}) {
${2:exception_name}
}$3try {
${1}
} finally {
${2}
}$3try {
${1}
} catch(Exception ${2:exception_name}) {
${2:exception_name}
} finally {
${3}
}${4}${1:public} class ${2:ClassName} {
${0}
}$0${1:public_or_private} class ${2:ClassName} {
${3:public_or_private} ${2:ClassName} (${4:Parameters}) {
${5}
}
}${1:public} ${2:ClassName} (${3:Parameters}) {
${4}
}$5${1:private} ${2:ClassName} (${3:Parameters}) {
${4}
}$5${1:public} ${2:ClassName} (${3:Parameters}) {
${4}
}$5${1:private} ${2:ClassName} (${3:Parameters}) {
${4}
}$5${1:public_or_private} static ${2:ClassName} (${3:Parameters}) {
${4}
}$5/**
* @description your_method_description
* @param param_name your_param_description
* @return return_type your_return_description
**/$1/**
* The ____ program implements/is used for.....
*
* @author
*/System.out.println(${1});$2return ${1};${2}return true;return false;return this;return null;return 0;return -1;return -1;