Call

A call is the invocation of a function or method.

Related concepts:  FunctionMethodReturn

Closest Wikipedia entry:  Subroutine — In computer programming, a function or subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed. Functions may be defined within programs, or separately in libraries that can be used by many programs.

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Call is based on principled authoritative sources such as:

Misconceptions about Call
52 documented Misconceptions

Check Yourself
Misconception
BaseCaseNotNeeded
Recursive computations do not necessarily need a base case
Misconception
BaseCaseSelfRecursive
The base case of a structural recursion consists of a recursive self-call
Misconception
CallNotStaticallyChecked
A method invocation on a reference of a type that does not have that method won't compile
Misconception
CallOnPrimitive
One can invoke a method on primitive values
Misconception
CallRequiresVariable
One needs a variable to invoke a method
Misconception
CallWithoutFrame
A method invocation does not necessarily allocate a stack frame
Misconception
CallerFrameContainsCalleeFormal
Stack frame of caller includes variables for callee's formal parameters
Misconception
CannotChainMemberAccesses
Member accesses cannot be chained together
Misconception
CannotChainMemberToConstructor
Method calls or field accesses cannot be chained to a constructor invocation
Misconception
ChainedMethodsNotCalledFromOutside
Chained methods are all called on the object at the beginning of the chain
Misconception
ConstructorAllocates
The constructor allocates the object
Misconception
ConstructorReturnsObject
Constructors need to return objects
Misconception
ConstructorWithoutNew
One can write the constructor name, without new, to instantiate a class
Misconception
DeferredReturn
A return statement in the middle of a method doesn't return immediately
Misconception
FrameIsClassInstance
A stack frame is the same as an instance of a class
Misconception
InlineCallInExpressionTree
The expression tree of an expression involving a call inlines the call's computation of the returned value
Misconception
InterproceduralEdge
In an intra-procedural control-flow graph, method call nodes point to the called method
Misconception
NoCallOnStringLiteral
One cannot invoke methods on String literals
Misconception
NoInsideMethodCallInConstructor
It is foirbidden to call other methods on the same object while inside its constructor
Misconception
NoStringToString
One cannot invoke toString() on a String
Misconception
ObjectLabeledWithConstructorSignature
In stack and heap diagrams, an object on the heap is labeled like a stack frame of a constructor call
Misconception
ObjectsMustBeNamed
A variable is needed to instantiate an object
Misconception
OutsideInMethodNesting
Nested method calls are invoked outside in
Misconception
ParenthesesOnlyIfArgument
() are optional for method calls without arguments
Misconception
RecursiveCallSiteNoReturn
Tail-recursive call sites have no continuation
Misconception
ReturnCall
Return statements need () around the return value
Misconception
ReturnUnwindsMultipleFrames
A return statement can unwind multiple call stack frames
Misconception
RightToLeftChaining
Chained accesses are invoked from right to left
Misconception
StackTraceIsCallHistory
A stack trace is the sequence of previously called methods
Misconception
StaticCallPolymorphic
A static method call is dispatched polymorphically at runtime based on the argument types
Misconception
StaticDispatch
The method to be called is determined by the static type
Misconception
StaticFrameInGlobals
Stack frame of static method calls lives in the global memory area
Misconception
SuperAlwaysHasParentheses
To call a method on a superclass, parentheses are needed after the keyword super
Misconception
SuperNotFirstStatement
super() can be called anywhere in the constructor of a subclass
Misconception
ThisChildInCallExpression
Instance method or constructor call nodes in expression trees have a child labeled "this"

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.