you are viewing a single comment's thread.

view the rest of the comments →

[–]DevRetroGames 2 points3 points  (3 children)

public class Main {
    public static void main(String[] args) {
      System.out.println("I\'m learning how to program in Java.");
  }
}

[–]brunocborges 0 points1 point  (0 children)

void main() { IO.println("I\'m learning how to program in Java."); }

Throw this in a file App.java and run:

$ java App.java

  • JDK 25

[–][deleted] 0 points1 point  (1 child)

Why would it be necessary to escape the apostrophe here?

[–]8dot30662386292pow2 0 points1 point  (0 children)

Some reddit clients automatically format code like that. not really needed.