Top "Methods" questions

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

Is it possible to declare default argument in Java in String?

Is it possible to use default argument in the method with String. The code is shown below: public void test(…

java methods default-value
Undefined method '>' for nil:NilClass <NoMethodError>

Ok I do have the following code def update_state_actions states.each do |state| @state_turns[state.id] -= 1 …

ruby methods operator-keyword
Calling a method on the main thread?

First of all I am writing code for iphone. I need to be able to call a method on the …

ios objective-c iphone multithreading methods
How to call a method stored in a HashMap? (Java)

I have a list of commands (i, h, t, etc) that the user will be entering on a command line/…

java hash methods invoke
Can I use methods of a class without instantiating this class?

I have a class with several methods and there is no constructor among these methods. So, I am wondering if …

java oop class methods instantiation
Why are C# interface methods not declared abstract or virtual?

C# methods in interfaces are declared without using the virtual keyword, and overridden in the derived class without using the …

c# methods interface abstract virtual-functions
Retrieving the calling method name from within a method

I have a method in an object that is called from a number of places within the object. Is there …

c# reflection methods calling-convention
Hibernate Delete Error: Batch Update Returned Unexpected Row Count

I wrote this method below that is suppose to delete a member record from the database. But when I use …

java hibernate methods dao
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 …

function scala methods
getActivity() where it is defined?

I'm very new to android and I'm following this example. The code says we need to do these steps to …

android methods android-alertdialog