I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.os.Build; | |
| import java.lang.reflect.Method; | |
| public class Device { | |
| /** | |
| * @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status | |
| * > Serial number}, or {@code null} if the serial number couldn't be found | |
| */ | |
| public static String getSerialNumber() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Code BEFORE Refactor | |
| /////////////////////////////// | |
| $("#judy-char").on("click", function () { | |
| // choose char | |
| if(charChosen == false) { | |
| $("#game-message").empty(); | |
| // set char | |
| getchar(judy); | |
| charChosen = true; | |
| // display char |