• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

split() method

 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, This is from whizlabs, I think the reason for first output is "s" represents space..why commas are coming. "e" represent what ? why no commas ?
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harikrishna Gorrepati wrote:Hi, This is from whizlabs, I think the reason for first output is "s" represents space..why commas are coming. "e" represent what ? why no commas ?


You'll want to look at the regular expressions tutorials to see what \\s and \\e actually represent and also the java.util.Arrays api for what is returned by its toString method. I'll help you a bit with the latter -- Note the different outputs:


Luck!
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harikrishna, I don't wish to be rude, but what have you done so far to study Java? Have you gone through the Oracle tutorials, read any books on Java?

I think you would benefit a lot from doing some proper studying, before you ask all these questions.
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Harikrishna, I don't wish to be rude, but what have you done so far to study Java? Have you gone through the Oracle tutorials, read any books on Java?

I think you would benefit a lot from doing some proper studying, before you ask all these questions.



Indeed, I hadn't seen the volume of your questions til now. Asking questions in the forum is not a substitute for studying.
 
Ranch Hand
Posts: 432
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Harikrishna, I don't wish to be rude, but what have you done so far to study Java? Have you gone through the Oracle tutorials, read any books on Java?
I think you would benefit a lot from doing some proper studying, before you ask all these questions.


None of the question is small or worthless.Sometimes we get even confuse in addition-subtraction questions.
If your friend is asking something then he must having a problem understanding the same.
So instead giving excuse,it will be better to provide him solutions or any link that will help your friends.
 
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not making excuses, I'm more than happy to help him. In this case, I hope he'll take my advise and study.

It's much more easy to study and then ask questions, instead of just looking at examples and then asking questions.
 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:I'm not making excuses, I'm more than happy to help him. In this case, I hope he'll take my advise and study.

It's much more easy to study and then ask questions, instead of just looking at examples and then asking questions.

Hi Stephan/ Pete, I appreciate and thanks for your suggestion. Before I ask the question, I put all my efforts to solve it. This particular topic in chapter 6 is very confusing. That' why I raised this question. If you can send some sample tutorial links, that would be really helpful.
 
Stephan van Hulst
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read the Oracle tutorials? If you haven't, you probably will be familiar with a lot of it, but it can't harm to go over the topics which you don't fully understand again. These lessons are very clear:

http://download.oracle.com/javase/tutorial/
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't believe he will find this kind of non-printable special chars in the tutorial.

Harikrishna, I believe this will help: http://www.regular-expressions.info/characters.html

Stephan van Hulst wrote:Have you read the Oracle tutorials? If you haven't, you probably will be familiar with a lot of it, but it can't harm to go over the topics which you don't fully understand again. These lessons are very clear:

http://download.oracle.com/javase/tutorial/

 
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic