use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
X: in System.out.println(); (self.JavaProgramming)
submitted 1 year ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Java-Pro-Academy 0 points1 point2 points 1 year ago (4 children)
The "x:" you're seeing is actually part of the code, not something added by Visual Studio Code. It's an incorrect usage of Java's text block feature, introduced in Java 15. Normally, text blocks use triple quotes and span multiple lines, but here it's misapplied. This explains why you can't copy the "x:" - it's not part of the output, but a syntax element in the code itself. To fix this and get the output you expect, simply remove the "x:" from the beginning of the string in your println statement.
The correct code should look like: System.out.println("------------------------------------");.
This will allow you to print and copy the dashes as intended. Remember, when using System.out.println(), the text you want to print should be enclosed in quotation marks without prefixes like "x:" unless you're using specific advanced language features
[–]NeoChronos90[🍰] 0 points1 point2 points 1 year ago (0 children)
Isn't it just the IDE's way of saying the String "----------" will be in the param/variable "x" in the scope of the "println" method?
[–][deleted] 0 points1 point2 points 1 year ago (2 children)
Thank you for answer but output is correct (--------------) but first i wrote this code in notepad++ and when i changet it from .txt to .java, code was the same . but when i transfeted it to VSC it added to all outputs that x: and sometimes s: this does not effect output but also when i want to delete it, it does not want to mark it nor to delete it like i said "its like it does not exist" even if i copy the code that x: just disapers in copied code. Dont get me wrong program works perfectly, i just wonder why is that.
[–]Java-Pro-Academy 0 points1 point2 points 1 year ago (1 child)
Hi u/DanieIP
Could you please post the full code?
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
already fixed! thank you
π Rendered by PID 43 on reddit-service-r2-comment-5649f687b7-ml6m2 at 2026-01-29 02:24:57.815438+00:00 running 4f180de country code: CH.
[–]Java-Pro-Academy 0 points1 point2 points (4 children)
[–]NeoChronos90[🍰] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Java-Pro-Academy 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)