Top "Methods" questions

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

How can I get the value of a session variable inside a static method?

I am using ASP.NET page methods with jQuery.... How do I get the value of a session variable inside …

c# asp.net methods static session-variables
array_unique for objects?

Is there any method like the array_unique for objects? I have a bunch of arrays with 'Role' objects that …

php arrays methods
Can non-static methods modify static variables

I am wondering how a non static method can modify a static variable. I know that static methods can only …

java methods static instance-variables access-modifiers
Method vs Computed in Vue

What is the main difference between a method and a computed value in Vue.js? They look the same and …

javascript methods vue.js vuejs2 computed-properties
How to find where a method is defined at runtime?

We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, …

ruby-on-rails ruby runtime methods definition
Optional Methods in Java Interface

From my understanding if you implement an interface in java, the methods specified in that interface have to be used …

java methods interface
Should private helper methods be static if they can be static

Let's say I have a class designed to be instantiated. I have several private "helper" methods inside the class that …

java static methods static-methods
new keyword in method signature

While performing a refactoring, I ended up creating a method like the example below. The datatype has been changed for …

c# methods keyword
Cannot Assign because it is a method group C#?

Cannot Assign "AppendText" because it is a "method group". public partial class Form1 : Form { String text = ""; public Form1() { InitializeComponent(); } private …

c# .net methods assign method-group
Is it wrong to use Deprecated methods or classes in Java?

I am using eclipse to develop a web application. Just today I have updated my struts version by changing the …

java methods deprecated