hi
can anybody tell me how ti skip blank spaces in java.Is there any function for that.Or we have to write code for that.

thanks

Recommended Answers

All 6 Replies

You have to write code for everything in Java - that's pretty much the point. What you write really depends on what you are trying to do, which you failed to adequately explain. What do you want to "skip blank spaces" in? What are you wanting to do with the "not blank spaces" remainder?

Look into Character.isSpaceChar(char ch)

Or split(), regex, indexOf(), trim()... all of those could be useful, depending on the intent.

even using indexOf(" "); propably could help you out.
but what do you mean with "skip" read over them, erase them out of the String, ... ?

Next time use another title. The rule says titles such as 'help me' and the like are not encouraged.

Good idea; edited.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.