+ 3
("\\") what on earth are these?
Yeah
14 Respostas
+ 3
BrandnameOra You mean this post: https://www.sololearn.com/post/100929/?ref=app ?
+ 21
BrandnameOra
I hope, this example will help you! đ
âą https://code.sololearn.com/c17vrZNd1e5t/?ref=app
âą https://code.sololearn.com/WgjV487TEMRS/?ref=app
[ Edited: ]
â String[] split(String regex, int limit);
This String split method is used when we want the substrings to be limited â https://beginnersbook.com/2013/12/java-string-split-method-example/
âą split("anydelimiter", 3) would return the array of only 3 strings even if the delimiter is present in the string more than 3 times.
â If the 'limit is negative' then the returned array would be having as many substrings as possible however when the 'limit is zero' then the returned array would be having all the substrings excluding the trailing empty Strings.
+ 20
âą Any letter suffixed to \ is treated as an 'escape sequence' by the JVM.
âą \\ is also an escape sequence and JVM places a single slash (instead of two slashes) in the output.
âą In writing the regular expressions also, it must be taken care of.
+ 8
TheCoder | Hi fellow coders I think you're confusing forward slashes with backslashes.
+ 3
"\" is also known as escape sequence character. The character followed by "\" is treated like a special character. For example "\n" means line break. "\r" means carriage return, etc.
Similarly, "\" is also used to assign (or print) some special characters. For example you want to output
hello \n world
Then you can't write System.out.println("hello \n world");
Because it will give output
hello
world
And so, to prevent it, you should write
System.out.println("hello \\n world");
NOTE: here the second forward slash between first forward slash and character n is treated special due to first forward slash. And so first forward slash will not be printed, but the second forward slash will get printed.
+ 3
BrandnameOra In your profile section (hit the đ€ icon at the top) you will find those posts under your activity tab. All of your comments are listed there also.
The problem with posting in your feed is that most people's feed posts rarely get seen so đ€·ââïž
Now remember, there is a difference between your personal feed posts and your questions here in the Q&A section.
That post that I linked was a personal feed post which, as I said, you can find under your activity tab in your profile.
Your Q&A posts you can find by going to the Q&A section and changing the sorting from "hot today" to "my questions".
You are using the app right, and not the seriously lacking PC version right? đ€š
+ 2
It is just another character. The backslash itself is an escape character so it must be escaped by itself to print just one backslash.
E.X :
System. out. print(" Hi \\ Friends " );
The output will be : Hi \ Friends .
If you do like this :
System. out. print(" Hi \ Friends " );
The compiler will give you an error telling you that you used an illegal escape character
Becuase \ itslelf it's an escape character , if you put it alone it will show you a error , so we use \\ to tell the complier to print backward slash \.
+ 2
Decimis â đŻđđđđđđ
Wholly Molly!!!
How did you find it?
I'm far from stupid, but I have tried to find my own questions and couldn't find them.
Makes this Finlandes (french quote to lift my spirits) a bit sore
And I'm not stupid, but it's probably a simple solution that I have not just thought about.
+ 2
And I stillhave no idea what this means?
String a[]="76.88.".split ("\\.",-1)
+ 2
BrandnameOra Do you use Google photos? You can get safe, postable links to individual photos of yours that way. That is what I use myself.
+ 1
Hey Chirayu Joshi
Thanks for your help here. I really appreciate it.
I posted the further question in my "what's going on?" question.
I still don't know how to find it after I posted it, which makes it impossible to share with you.
Can you find it somehow?
+ 1
It's so great that you all help me.
Although this code line was on the Java challenge questions.
And I have no idea what it means.
String a[]="76.88.".split ("\\.",-1)
+ 1
Decimis â đŻđđđđđđ
Okay, I knew about the profile section, that I can see it from there.
But all the people are posting in there like crazy, so I usually have no chance of looking at my posts afterwards.
Which is a shame.
And I like to post at the q&a section, but I can't upload a picture there...
And like in this post's question, I needed to take a screenshot of the challenge question to copy the code line.
Which was a quite a task, I must say.
And if I remember correctly, you can not tag anyone to your activity post...
Oh, and I'm using the Sololearn application on my Nokia 6 smartphone.
0
Okay, it's a good advice