Skip to content

Instantly share code, notes, and snippets.

@softprops
Last active March 7, 2024 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save softprops/47cc23776ecffdb513531167265f1bb9 to your computer and use it in GitHub Desktop.
Save softprops/47cc23776ecffdb513531167265f1bb9 to your computer and use it in GitHub Desktop.
coder pad java template
import java.io.*;
import java.util.*;
import static org.junit.Assert.*;
// fmt: shift + cmd + f
// imports : shift + cmd + o
class Solution {
// impl
// 👇
static int solve(int x, int y) {
return x + y;
}
// prove it
public static void main(String[] args) {
var start = System.currentTimeMillis();
// tests
assertEquals(
2,
solve(1, 1));
System.out.println("🐶 ✨ passed in %dms".formatted(System.currentTimeMillis() - start));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment