File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Help with this String Thing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with this String Thing" Watch "Help with this String Thing" New topic
Author

Help with this String Thing

Rebecca Herbert
Greenhorn

Joined: Feb 01, 2012
Posts: 3
I am on a team that has to write programs for class, and we are stuck with an issue with this code. When we put in a value, it doesn't print anything. Any ideas what the problem is?

Any help is appreciated.
Carey Brown
Ranch Hand

Joined: Nov 19, 2001
Posts: 170

Try .equals() instead of ==. The former compares the contents of two objects, the later compares the two object references to see if they refer to the same object.
Rebecca Herbert
Greenhorn

Joined: Feb 01, 2012
Posts: 3
You are awesome. Thanks so much for the quick effective response.
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Hi, and welcome to the Ranch!

Here are a couple of tips to make your time here more productive and rewarding.

1. When posting code, please UseCodeTags(←click) to make it more readable. I've added them to your initial post for you.

2. Please KeepItDown(←click). An abundance of exclamation marks seems like shouting, and nobody likes to be shouted at.

Happy coding!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with this String Thing
 
Similar Threads
this problem baffles me
problem with findinline function
array question
Getting the average to display
Why does my 'd' variable stay at zero?