aspose file tools*
The moose likes Beginning Java and the fly likes do..while loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "do..while loop" Watch "do..while loop" New topic
Author

do..while loop

prerna boja
Ranch Hand

Joined: Aug 19, 2004
Posts: 67
Hi all,


I have the following program. I have to get the number of question marks,semicolons.... in the ouput. I am getting the output wrong. Please help me....




Shell1.dat : There are lots of symbols in this file: ..;;??
.,.,.,?::: .


I have to get only 3 question marks but I am getting the ouput as 63.
Jeff Jetton
Ranch Hand

Joined: Mar 29, 2005
Posts: 71
I'll give you a hint:

The ASCII code for a question mark is 63. What line in your code might be printing the numerical representation of a letter by mistake?

- Jeff
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
Perhaps simplifying even further: What line prints?


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Perhaps you can start by showing us the output you get. It will also help if you describe how it differs from what you expect. Then you can use the suggestions above to track down the cause of this difference.

Layne


Java API Documentation
The Java Tutorial
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: do..while loop
 
Similar Threads
Please help!
extracting strings
I/O File problem.
Can not find my error ? Help
while loop with an if loop (help)