So I coded up a simple test program for an algorithm in Eclipse 3.7.2. When I went to go run it, I was met with some gray bar that appeared on the top portion of the console. It reads: <terminated> test[Java Application]C:\Program Files\Java\jre6\bin\javaw.exe. Anyone know what's causing this? 
- you should show a picture or something to make it more clear what the problem is.Austin– Austin2012-11-14 05:21:46 +00:00Commented Nov 14, 2012 at 5:21
- Both requests have been filled.John Roberts– John Roberts2012-11-14 05:25:51 +00:00Commented Nov 14, 2012 at 5:25
- 1It looks like your application finished running. It never reached a println so it didn't print to the console.Austin– Austin2012-11-14 05:28:10 +00:00Commented Nov 14, 2012 at 5:28
- I think you're right. I just put another print statement at the very beginning of the function, and that worked. If you post this as an answer, I'll be glad to accept it.John Roberts– John Roberts2012-11-14 05:30:14 +00:00Commented Nov 14, 2012 at 5:30
2 Answers
Your program is executing properly. The problem is in the logic of your program which is never allowing it to reach the print statement. When you do
if(s==original) return; This statement s==original always returns true in your case since this operator will compare the two objects. You need to rethink your logic here and google about what == operator does in Java.
Also, on another note, instead of using an array String[] s = {"a","b","c"}, why dont you use a string String s = "abc";
Comments
You Need to go to Control Panel > Windows Firewall and select Restore defaults but if you don't want to lose other settings, you could try Advanced Settings and find eclipse in there.