-
-
Save benjholla/b9c6a7984da3f92f8e106f9ed5106c92 to your computer and use it in GitHub Desktop.
Java Puzzle 2 (spot the bug if one exists)
This file contains 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
package com.puzzles; | |
public class Puzzle2 { | |
public static void main(String[] args) { | |
// prints the classpath entry: com/puzzles/Puzzle2.class | |
System.out.println(Puzzle2.class.getName().replaceAll(".", "/") + ".class"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #20