File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

whats wrong with my code ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Greg Brannon
Bartender
Posts: 563
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 563
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic