Top "Methods" questions

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

How to log as much information as possible for a Java Exception?

There's a common problem I've come across a few times when logging Exceptions. There seem to be various different types …

java exception logging methods stack-trace
Are there any Java method ordering conventions?

I've got a large-ish class (40 or so methods) that is part of a package I will be submitting as course-work. …

java methods conventions
Write a mode method in Java to find the most frequently occurring element in an array

The question goes: Write a method called mode that returns the most frequently occurring element of an array of integers. …

java arrays methods mode
includes() not working in all browsers

right here is a block of my code. It works perfect in fireFox and Chrome. But not in IE. I …

javascript function internet-explorer methods microsoft-edge
multiple conditions for JavaScript .includes() method

Just wondering, is there a way to add multiple conditions to a .includes method, for example: var value = str.includes("…

javascript methods
Why can't I declare static methods in an interface?

The topic says the most of it - what is the reason for the fact that static methods can't be …

java interface methods static
Can there exist two main methods in a Java program?

Can there exist two main methods in a Java program? Only by the difference in their arguments like: public static …

java methods arguments main
Passing an Array as Arguments, not an Array, in PHP

I seem to remember that in PHP there is a way to pass an array as a list of arguments …

php arrays function methods
Retrieving data from a POST method in ASP.NET

I am using ASP.NET. There is a system that needs to POST data to my site and all they …

c# asp.net vb.net methods postback
Passing a method as a parameter in Ruby

I am trying to mess around a little bit with Ruby. Therefor I try to implement the algorithms (given in …

ruby parameters methods