Return ArrayList from ArrayList method type?

I'm making a little card deck program that uses an ArrayList for the deck. One of the limitations set upon me is th...

Java: how to return an Array??

this is the code, from what I understand, it is suppose to work. Also when I debug my program, it seems that the arr...

Differences between System.out.println() and return in Java?

I'm trying to understand the difference, and benefits of using System.out.println() vs. return blah in a method. It...

C# compiler error: “not all code paths return a value”?

I'm trying to write code that returns whether or not a given integer is divisible evenly by 1 to 20, but I keep rece...

error: function returns address of local variable?

I'm beginner with C and I am learning on my own. I am creating the following function: char *foo(int x){ if(x...

Return outside method error?

boolean openingboard; { Robot robot = new Robot(); Color color3 = new Color(108, 25, 85); Rectangle rectangle = n...

How to return a struct from a function in C++??

I've tried on a few different forums and can't seem to get a straight answer, how can I make this function return th...

Warning: return from incompatible pointer type in C?

The below code generates an incompatible pointer type error and warning: control reaches end of non-void function in...

What does `return 0x1;` mean??

When browsing the source of a project on web I've found some return statement in main that looks weird to me: int m...

“Missing return statement” within if / for / while?

I have a question regarding return statements used within if() while() or for() statements. As you can see in the fo...

Return multiple values in JavaScript??

I am trying to return two values in JavaScript. Is this possible? var newCodes = function() { var dCodes = ...

pgsql return table ERROR: column reference is ambiguous?

I keep getting this ERROR: column reference "person" is ambiguous. It is required of me to return a TABLE (person ...

Does return stop a loop??

Suppose I have a loop like this: for (var i = 0; i < SomeArrayOfObject.length; i++) { if (SomeArray[i].SomeVa...