This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Help in Java using feet and inches Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help in Java using feet and inches" Watch "Help in Java using feet and inches" New topic
Author

Help in Java using feet and inches

stephanie ruiz
Greenhorn

Joined: Dec 06, 2009
Posts: 1

Im really confused on how to put " and ' in java.
For example:

I want to put: 32' 6"
then: 15' 11"
and get: 16' 7" <- output
I want the output to have both feet and inches and I also want to be ble to input feet and inches.

I cant get it to work, I was told to put "\"" in order to get ", and put "'" to get ', but all Im getting is an error I dont even know were to put the ' and " I really need help with this.
I really appreciate any help with this.
This is what I have so far:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63195
    
  69

Posting code as a JPG image isn't the best way to do it. Please post as text and use code tags. Please read this for more information.

You can go back and change your post to add the code and tags by clicking the button on your post.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43900
    
  32
Welcome to the Ranch

Code tags, as Bear said, please, not colours.

Try this:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help in Java using feet and inches
 
It's not a secret anymore!