Why does the setColor method have all that logic? Don't bother to tell me. It must not be important if there are not any comments in the code describing why. color3 is a local variable and will go...
Type: Posts; User: Norm
Why does the setColor method have all that logic? Don't bother to tell me. It must not be important if there are not any comments in the code describing why. color3 is a local variable and will go...
Are you asking a serious question, or just wondering about various coding techniques?
Write a small simple program that compiles and executes to show what your problem is. Post it here.
Yes you can put any code you want in your methods.
dataType value = setMethod(); // this doesn't work because setMethod does not return anything. (void)
You should use the method to compare objects.
Yes, you define the ints at the outer most level of {}s that you want the ints to be in scope.
If you define a variable inside of { }s, when the execution exits the {}s, the variable goes out of scope and is GONE.
You have 240+ posts. I would assume that you know about the "scope" of variable definitions. If not, you need to do some research on the topic.
What is the "it"?
Are you getting error messages?
Please copy full text of error message and paste it here. Here is a sample:
TestSorts.java:138: cannot find symbol
symbol : variable var...
Are there any questions or comment now? Is this the final working program? Problem solved?
An approach:
Have a method that given a location and piece would return a list of all the possible paths that a piece could move on. The path would consist of a list of squares that the piece could...
You left off the pawns. There are more of them than all the other pieces.