mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 13:01:10 +08:00
adding initial list of java quotes
This commit is contained in:
parent
4ac6cd3ac2
commit
d5ec040973
1 changed files with 30 additions and 0 deletions
|
@ -12,6 +12,36 @@
|
|||
"source": "W3Schools - Java Getting Started",
|
||||
"id": 1,
|
||||
"length": 87
|
||||
},
|
||||
{
|
||||
"text": "void finish(String name){\n\tSystem.out.println(\"My job here is done. Goodbye \" + name);\n}",
|
||||
"source": "Create a procedure - programming-idioms.org",
|
||||
"id": 2,
|
||||
"length": 89
|
||||
},
|
||||
{
|
||||
"text": "int square(int x){\n\treturn x*x;\n}",
|
||||
"source": "Create a function which returns the square of an integer - programming-idioms.org",
|
||||
"id": 3,
|
||||
"length": 33
|
||||
},
|
||||
{
|
||||
"text": "for (int i=0; i<items.length; i++) {\n\tdoSomething(items[i]);\n}",
|
||||
"source": "Iterate over list values - programming-idioms.org",
|
||||
"id": 4,
|
||||
"length": 33
|
||||
},
|
||||
{
|
||||
"text": "public enum OperatingSystem {\n\tOSX, WIndows, LINUX;\n\tpublic String toString() {\n\t\tswitch(this) {\n\t\t\tcase OSX: return \"Mac OS\",\n\t\t\tcase WINDOWS: return \"Windows\";\n\t\t\tcase LINUX: return \"Linux\";\n\t\t}\\n\t}\n}",
|
||||
"id": 5,
|
||||
"source": "Community contribution",
|
||||
"length": 202
|
||||
},
|
||||
{
|
||||
"text": "boolean contains(int[] list, int x) {\n\tfor(int y: list)\n\t\tif (y == x)\n\t\t\treturn true;\n\treturn false;\n}",
|
||||
"id": 6,
|
||||
"source": "Check if list contains a value - programming-idioms.org",
|
||||
"length": 55
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue