[personal profile] kpreid

What do practicing Java programmers call the part of a method definition that isn't the { body }?

__________/ this bit here \___________
public static void main(String[] args) {
  // not this part
}

A quick search turned up the Java Language Specification, Second Edition calling it a MethodHeader in the grammar, but it doesn't use that term in the text and I want to know what term(s) are used in practice, not solely by language lawyers.

(“Signature” is not correct, as that includes only the method name and parameter types, not modifiers and result type.)

(no subject)

Date: 2009-09-18 04:08 (UTC)
From: [identity profile] laurent-atl.livejournal.com
the java programmers i know call it the prototype, i think, but this is probably because they were originally C++ coders.

(no subject)

Date: 2009-09-18 05:51 (UTC)
From: (Anonymous)
Method header sounds good to me...

I used to call it signature

Date: 2009-09-18 10:26 (UTC)
From: (Anonymous)
I called it signature, but I guess I shouldn't. So method header it is from now on.

(no subject)

Date: 2009-09-18 14:03 (UTC)
From: [identity profile] bitjuggler.livejournal.com
As a practical and practicing java programmer, I call it a signature, despite the slight technical inaccuracy: it's close enough to get the point across in conversation that bothering to differentiate is likely not worth the effort -- unless, of course, you're actually talking in a context that requires that differentiation, in which case I would call it the 'full signature' or 'method definition' or somesuch.

(no subject)

Date: 2009-09-18 17:20 (UTC)
From: [identity profile] dougo.livejournal.com
Declaration, maybe?

Unnecessary boilerplate

Date: 2009-09-19 13:11 (UTC)
From: (Anonymous)
Unnecessary boilerplate

Signature

Date: 2009-09-24 21:00 (UTC)
From: (Anonymous)
Hey it's Mwn3d from RC. Everywhere I've read and every time I've heard someone talk about it, it's called the signature. Even in IDEs for auto-complete purposes it's called the signature.