Top "Methods" questions

A method is a block of code that performs a task and is associated with a class or an object.

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 …

python oop methods monkeypatching
Why do some functions have underscores "__" before and after the function name?

This "underscoring" seems to occur a lot, and I was wondering if this was a requirement in the Python language, …

python function methods double-underscore
What's a "static method" in C#?

What does it mean when you add the static keyword to a method? public static void doSomething(){ //Well, do something! } …

c# methods static
How to Exit a Method without Exiting the Program?

I am still pretty new to C# and am having a difficult time getting used to it compared to C/…

c# methods return exit
How to display all methods of an object?

I want to know how to list all methods available for an object like for example: alert(show_all_methods(…

javascript object methods
Converting Integers to Roman Numerals - Java

This is a homework assignment I am having trouble with. I need to make an integer to Roman Numeral converter …

java methods roman-numerals
Accessing a class' member variables in Python?

class Example(object): def the_example(self): itsProblem = "problem" theExample = Example() print(theExample.itsProblem) How do I access a class's …

python class methods return
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 …

java methods declaration final
Java variable number or arguments for a method

Is it possible to declare a method that will allow a variable number of parameters ? What is the symbolism used …

java methods arguments parameter-passing variadic-functions
Why doesn't Mockito mock static methods?

I read a few threads here about static methods, and I think I understand the problems misuse/excessive use of …

java methods static mockito