Skip to content

Instantly share code, notes, and snippets.

@mdmarufsarker
Created March 7, 2023 05:03
Show Gist options
  • Save mdmarufsarker/6d4fa947dd6408f042b70846b653b7b5 to your computer and use it in GitHub Desktop.
Save mdmarufsarker/6d4fa947dd6408f042b70846b653b7b5 to your computer and use it in GitHub Desktop.
{
// Place your snippets for java here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Java Code Snippet": {
"prefix": "java",
"body": [
"public class ${1:ClassName} {",
"\tpublic static void main(String[] args) {",
"\t\t${0:// code here}",
"\t}",
"}"
],
"description": "Main method for Java application"
},
"Main Method": {
"prefix": "main",
"body": [
"public static void main(String[] args) {",
"\t${0:// code here}",
"}"
],
"description": "Main method for Java application"
},
"Print Line": {
"prefix": "println",
"body": [
"System.out.println($0)"
],
"description": "Print line to console"
},
"Scanner": {
"prefix": "sc",
"body": [
"Scanner sc = new Scanner(System.in);"
],
"description": "Take Input From User"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment