Skip to content

Instantly share code, notes, and snippets.

@benjholla
Created August 29, 2018 01:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Java Puzzle 2 (spot the bug if one exists)
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");
}
}
@benjholla
Copy link
Author

Adapted from Java Puzzlers: Traps, Pitfalls, and Corner Cases - Puzzle #20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment