Skip to content

Commit 2af1f79

Browse files
authored
fix(quotes): code_java compilation fixes (@nafets-st) (monkeytypegame#6778)
### Description Fixes some compilation issues in the java quotes.
1 parent 3757744 commit 2af1f79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

frontend/static/quotes/code_java.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"length": 62
3333
},
3434
{
35-
"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}",
35+
"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}",
3636
"id": 5,
3737
"source": "Detect OS",
3838
"length": 201
@@ -50,10 +50,10 @@
5050
"length": 545
5151
},
5252
{
53-
"text": "public static int fibonacci(int n) {\n\tif (n <= 2) {\n\t\treturn 1;\n\t} else {\n\t\treturn fibonacci(n - 1) + fibonacci(n - 2);\n}",
53+
"text": "public static int fibonacci(int n) {\n\tif (n <= 2) {\n\t\treturn 1;\n\t} else {\n\t\treturn fibonacci(n - 1) + fibonacci(n - 2);\n\t}\n}",
5454
"id": 8,
5555
"source": "Find the nth Fibonacci Number Recursively",
56-
"length": 121
56+
"length": 124
5757
},
5858
{
5959
"text": "public static int binarySearch(int[] arr, int x) {\n\tint low = 0;\n\tint mid = 0;\n\tint high = arr.length - 1;\n\twhile (low <= high) {\n\t\tmid = (low + high) / 2;\n\t\tif (x == arr[mid]) {\n\t\t\treturn mid;\n\t\t} else if (x > arr[mid]) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid - 1;\n\t\t}\n\t}\n\treturn -1;\n}",

0 commit comments

Comments
 (0)