hey all,
am a bit stuck here. basically would like to return the color object so am I right in thinking this is just the rgb values? If not then what would the return type be in the method? i.e. in this case I have put int for the rgb values

Also, what would be the syntax of returning the final three integers, seem to only be able to put one i.e. r in this case and not r,g,b?

Thanks for the reply there, but think my level of coding was already at its limit, now am a bit confused ; )

What does the this.r etc do?

04-01-2008, 12:30 AM

Java Tip

With 'this' keyword, you are accessing to the class variables. If i do not write 'this' keyword there, i can not change the instance variable of the class. Check parameter names of that method! They are same with class variables' names. In this way, i told compiler which variable to access to eliminate confusion. If you dont want 'this' keyword there just rename method parameters to sth else and remove 'this' keyword.