problems in recognising & in a string

P

pooja

how can one recognise & in java string when taken as command line
argument,as many special characters like |,>,<, & and * are never
accepted in the string and no exception ever handles them ,so I have
already made an exception in my code to handle these 5 characters ie
by using switch case,anyways the control does not recognises & and
still crashes,means does not gets into the catch statement while in
other 4 cases >,< ,|,* it does, how can this problem solved?
 
A

Antti S. Brax

how can one recognise & in java string when taken as command line
argument,as many special characters like |,>,<, & and * are never
accepted in the string and no exception ever handles them ,so I have
already made an exception in my code to handle these 5 characters ie
by using switch case,anyways the control does not recognises & and
still crashes,means does not gets into the catch statement while in
other 4 cases >,< ,|,* it does, how can this problem solved?

There is a bug in your code. You did not include any code.
'&' is a character like any other. There is no special cases
involving that character.

Read <http://www.physci.org/codes/sscce.jsp> before sending
code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top