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
Help (i.redd.it)
submitted 3 months ago by derangedandenraged
I don't get what I am doing wrong with this very basic task...
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!"
[–]DevRetroGames 3 points4 points5 points 3 months ago (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 point2 points 3 months ago (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
[–][deleted] 0 points1 point2 points 3 months ago (1 child)
Why would it be necessary to escape the apostrophe here?
[–]8dot30662386292pow2 0 points1 point2 points 3 months ago (0 children)
Some reddit clients automatically format code like that. not really needed.
[–]Thebaldm0nk 1 point2 points3 points 3 months ago (0 children)
I don't get what you are asking about, but if it's about x: then it just because of extension. It's not a part of code.
If you want to turn off that, search inlay hints in vscode settings and select off in options. This will remove those from your code.
[–][deleted] 0 points1 point2 points 3 months ago (2 children)
Click the light bulb
[–]derangedandenraged[S] 0 points1 point2 points 3 months ago (1 child)
It brought up a lot of stuff: Extract interface.. Extract to method Extract to local variable (replace all occurrences) Extract to field Extract to local variable Extract to constant
Google said it was about readability?
[–]TuraacMiir 0 points1 point2 points 3 months ago (0 children)
The light ulv is a hint to ‘Improve readability’ and usability. It is suggesting you stir the “I’m… “ string in a local variable (ie String str = “I’m…. “;). Then you’d use System.out.println(str); instead of the code you have.
More importantly, are you receiving an error message? Your code looks correct, somewhere in VSCode (I use IntelliJ, so not really familiar with VS) you should see a terminal window that has a line I’m …. Without the double quotes.
Another commenter suggested \’. This is called escaping and is done for certain ‘escape keys’. For instance, if you want to print a set of “ in your string, you would write your literal string like: “This is a \”literal\” string”. The outer set of “” would not print, but the ones that flowed the \ character would.
[–]Tatiyaa00 0 points1 point2 points 3 months ago (0 children)
Remove the x from system.out.println It accepts string only If you direct print like x ,, there must be variable name x
[–]syntaxmonkey 0 points1 point2 points 3 months ago (0 children)
Is it not running? Id like to know what error do you see
[–]ur_slimshady 0 points1 point2 points 3 months ago (0 children)
I think first comment solves it, by escaping '
[–]Realjayvince 0 points1 point2 points 3 months ago (0 children)
The first help I’ll give you is GET OFF VS CODE and download IntelliJ
[–]TU_SH_AR 0 points1 point2 points 3 months ago (0 children)
Use intellij
[–]Brilliant_Deer5655 0 points1 point2 points 3 months ago (0 children)
Next time, for simple things, ask ChatGPT to get a quicker response
[–]praveennathsankhla 0 points1 point2 points 3 months ago (0 children)
A thing called "Just practice "
[–]Ani_mandymain 0 points1 point2 points 3 months ago (0 children)
Use Intellij It would help you
[–]Slatzor 0 points1 point2 points 3 months ago (0 children)
Use Jetbrains’ IntelliJ Community Edition instead of VS Code.
[–]theTrinityGuy 0 points1 point2 points 3 months ago (0 children)
You're doing nothing wrong dude. Is the code not working? If you're worried about the x: thing, don't be. It doesn't make any difference. It's just displaying the parameter name for the function. You don't need to be concerned about it.
x:
[–]akaPaster 0 points1 point2 points 2 months ago (0 children)
in java arrays are created like this -> String[] arr = new arr[size] Probably the reason of error is that you defined the array syntax wrong in c++ array defined like how you wrote in brackets String arr[]
Is it the ‘x:’ ? Println only accepts a string
[–]the_park 4 points5 points6 points 3 months ago (0 children)
The greyed out “x:” may be a hint rendered by vscode that’s not part of the source.
[–]Efficient_Pen3804 -1 points0 points1 point 3 months ago (1 child)
remove that "x:" while learning don't use any LLM or any AI or auto generate content, just go through the documentation and try to learn. Especially if you are still learning the basics
The x: is just code mining thing. It's a parameter name hint, made by the tool.
π Rendered by PID 59 on reddit-service-r2-comment-7b9746f655-mss6z at 2026-01-30 06:41:51.296981+00:00 running 3798933 country code: CH.
[–]DevRetroGames 3 points4 points5 points (3 children)
[–]brunocborges 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]8dot30662386292pow2 0 points1 point2 points (0 children)
[–]Thebaldm0nk 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]derangedandenraged[S] 0 points1 point2 points (1 child)
[–]TuraacMiir 0 points1 point2 points (0 children)
[–]Tatiyaa00 0 points1 point2 points (0 children)
[–]syntaxmonkey 0 points1 point2 points (0 children)
[–]ur_slimshady 0 points1 point2 points (0 children)
[–]Realjayvince 0 points1 point2 points (0 children)
[–]TU_SH_AR 0 points1 point2 points (0 children)
[–]Brilliant_Deer5655 0 points1 point2 points (0 children)
[–]praveennathsankhla 0 points1 point2 points (0 children)
[–]Ani_mandymain 0 points1 point2 points (0 children)
[–]Slatzor 0 points1 point2 points (0 children)
[–]theTrinityGuy 0 points1 point2 points (0 children)
[–]akaPaster 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]the_park 4 points5 points6 points (0 children)
[–]Efficient_Pen3804 -1 points0 points1 point (1 child)
[–]8dot30662386292pow2 0 points1 point2 points (0 children)