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.
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!
Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
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: 530
posted
0
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.