mike ryan wrote:
and here is the FernseherRemote class,, i have the "System.out.println("sum ="+sum+" is here too!");" to see the sum (true or false) to see if the correct sum gets to those points, which they don't.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
SCJP6.0,My blog Ranchers from Delhi
SCJP6.0,My blog Ranchers from Delhi
Shanky Sohar wrote:Everything is perfectly fine..Except you have made some compile time error.but as you have mention that you code is running so i assume that you have made error while posting this code on javaRanch.
Just declare the sum as globally..
Like
and see the magic
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
SCJP6.0,My blog Ranchers from Delhi
That should readAlex Hurtt wrote:In Java, primitive arguments are passed "by value" not "by reference." . . .
In Java, all arguments are passed "by value" not "by reference."
mike ryan wrote:ok i have tried doing it a few different ways and still getting boolean sum=false?
Here is the code as it currently is
and the Fernseher class
any ideas? or is something more incorrect than i thought??
Mike
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Something must be done about this. Let's start by reading this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|