Skip to content

Instantly share code, notes, and snippets.

@dklotz
Last active February 9, 2018 09:17
Show Gist options
  • Save dklotz/03c660e7735e0c4e4bac528fef3d9280 to your computer and use it in GitHub Desktop.
Save dklotz/03c660e7735e0c4e4bac528fef3d9280 to your computer and use it in GitHub Desktop.
public class TestMain {
public static void main(String[] args) {
// What does this program print when run?
// \u000d System.out.println("Hello ");
System.out.println("World!");
}
}
fun main(args: Array<String>) {
// Does not work in Kotlin!
// \u000d println("Hello ")
println("World!")
}
@dklotz
Copy link
Author

dklotz commented Feb 9, 2018

See this SO question for more details why Java is behaving like that.

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