All Questions

4961
votes
73answers
1473819 views

Is Java "pass-by-reference" or "pass-by-value"?

I always thought Java was pass-by-reference; however I've seen a couple of blog posts (For example, this blog) that claim it's not. I don't think I understand the distinction they're making. What is...
1361
votes
16answers
820121 views

Static class variables in Python

Is it possible to have static class variables or methods in python? What syntax is required to do this?
230
votes
20answers
180244 views

Cannot refer to a non-final variable inside an inner class defined in a different method

Edited: I need to change the values of several variables as they run several times thorugh a timer. I need to keep updating the values with every iteration through the timer. I cannot set the values t...
1326
votes
33answers
503854 views

Difference between a method and a function

Can someone provide a simple explanation of methods vs. functions in OOP context?
421
votes
18answers
291934 views

What is the difference between class and instance methods?

What's the difference between a class method and an instance method? Are instance methods the accessors (getters and setters) while class methods are pretty much everything else?
461
votes
18answers
149486 views

Adding a Method to an Existing Object Instance

I've read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python. I understand that it's not always good to do so. But how might one do this?
241
votes
15answers
394714 views

When is the finalize() method called in Java?

I need to know when the finalize() method is called in the JVM. I created a test class which writes into a file when the finalize() method is called by overriding it. It is not executed. Can anybody t...
204
votes
5answers
54737 views

Difference between method and function in Scala

I read Scala Functions (part of Another tour of Scala). In that post he stated: Methods and functions are not the same thing But he didn't explain anything about it. What was he trying to say?
2306
votes
23answers
464084 views

What is the difference between @staticmethod and @classmethod in Python?

What is the difference between a function decorated with @staticmethod and one decorated with @classmethod?
20
votes
3answers
24985 views

Invoke direct methods or methods with arguments / variables / parameters in EL

How can I in JSF 2.0 invoke direct methods or methods with arguments / variables / parameters in EL? For example, getting the list size in EL: <h:outputText value="#{bean.list.size()}" /> Or...

Previous Next