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

whats wrong with my code ?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

when i run this code in cli (command line interface ) like terminal in linux
then the code runs fine
but when i run this same code in netbeans ..it gives me output like
first i entered 20 then 10 ..but it only print or accept second input ie 10.

in cli


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 563
You can't be running the same program at the command line as the code you're showing us. The command line result can't start with:

"enter 3 nos for addition :"

when it doesn't exist in the code you've shown us. So you're actually running two different programs. To get the same results: Check the source directory for your command line run to find the *.java and *.class files that you're running at the command line and open the *.java file at that location in Netbeans.

Good luck!


Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

Greg Brannon wrote:You can't be running the same program at the command line as the code you're showing us. The command line result can't start with:

"enter 3 nos for addition :"

when it doesn't exist in the code you've shown us. So you're actually running two different programs. To get the same results: Check the source directory for your command line run to find the *.java and *.class files that you're running at the command line and open the *.java file at that location in Netbeans.

Good luck!

both are same with slight changes
here is the code
Greg Brannon
Bartender

Joined: Oct 24, 2010
Posts: 563
both are same with slight changes

Then they're not the same.

How can we help you resolve differences between two resulting outputs if the code you're running to achieve the two sets of results isn't the same?

I'm not even sure what your question is now. Please restate your question being as specific as possible about the "problem" and clearly identifying the subject code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: whats wrong with my code ?