1) What exactly is creating the Foo object? Is it the syntax new Foo by itself or Foo f = new Foo.
2) When you say this is declaring an instance variable, I would like to know how is this so because I'm still a little confused about reference variables.
1) Does the compiler display a StackOverflowError message in the original code because of recursion or is it something else?
2) If it is recursion, how is the code "calling itself"?
3) When I assign the reference variable locally (although, I did not use it) like in solution 2, why does the compiler display the result twice?
Semyon Evsei wrote:Hello, I came accross the following example;
I would have thought that the result would be 21. However the result is 20. So what happens to ++?
Joshua William wrote:Thanks a lot for all of your replies. I joined freelancer.com and applied for form filling stuff. Went through the Java projects, but most of the projects are about Audio/Video/Face Recongnition, which I don't know.
However, I really expect more replies. Please all, reply.