Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Chris D Wilson wrote:Thank you for the advice and I have removed the double now.
Code now compiles and runs but now I have another issue! How do I return probA, probB, probC, probD, to the main? The probabilities can be printed in the calculateProb method but not in the main.
Chris D Wilson wrote:Can I return all 4 values or just one?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:When I then start writing code, I write 2-3 lines at most before I compile and test. That means I do a LOT of compiling and testing, but I always know withing 2-3 lines were the newly discovered error has to be.
I don't mean to be disheartening, but I think Fred is giving sound advice above when he saysChris D Wilson wrote:Thank you for the advice and I have removed the double now.
I'm saying this because I notice you seem to have removed the "static" keyword from the "main" method, which means that you'll have no way of executing the program if it does compile.fred rosenberger wrote:throw it all away and start over.
That's a very big dog. I think I want to go home now and hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|