answersLogoWhite

0

A Java method declaration will look like this:

[access modifier] [static] [final] [synchronized] [return type] [method name]([parameters])

Where:

access modifier is exactly one of the following

  • public
  • protected
  • (no text)
  • private

static, final, and synchronized are all optional.

return type is exactly one of the following

  • void
  • The name of a Java primitive
  • The name of a Java class

method name is a valid Java identifier which must conform to all of the following rules

  • Starts with a lowercase letter (a-z), an uppercase letter (A-Z), a dollar sign ($), or an underscore (_)
  • After the first character, may be a digit(0-9), a lowercase letter (a-z), an uppercase letter (A-Z), a dollar sign ($), or an underscore (_)
  • May not be one of the Java keywords
  • May not be one of the Java literals: true, false, or null

parameters is a comma-separated list of [type] [identifier] pairs, where:

  • type is a valid Java primitive or class name
  • identifier is a Java identifier, which conforms to the same rules as method name
User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the general syntax for inline image?

The general syntax for an inline image in HTML is: <img src="image.jpg" alt="Description of image">


What is one method of creating multimedia?

What is one method of creating multimedia?


What has the author H R Stokoe written?

H. R. Stokoe has written: 'The understanding of syntax' -- subject(s): Comparative and general Grammar, Grammar, Comparative and general, Syntax


What is the syntax in creating an object?

class_name object_name=new class_name(); eg: A a=new A();


What has the author David Adger written?

David Adger has written: 'Mirrors and microparameters' -- subject(s): Syntax, Comparative and general Grammar, Kiowa language 'A syntax of substance' -- subject(s): Comparative and general Grammar, Phrase structure grammar, Semantics, Syntax


What is the required syntax for creating C arrays?

The required syntax for creating C arrays include the brackets, array size, variety length arrays, codes like std:vector, classPTR, and many more to create C arrays.


What step in scientific method involves creating a chart graph?

In the general category of communicating your results. most call it "analyzing results"


What has the author Edwin Samuel Williams written?

Edwin Samuel Williams has written: 'Rule ordering in syntax' -- subject(s): Comparative and general Grammar, English language, Grammar, Comparative and general, Syntax


What has the author Michael Ridley Thomas written?

Michael Ridley Thomas has written: 'Natural syntax and Indonesian' -- subject(s): Comparative and general Grammar, Grammar, Comparative and general, Indonesian language, Syntax


What has the author Chiara Polo written?

Chiara Polo has written: 'Word order between morphology and syntax' -- subject(s): Comparative and general Grammar, Grammar, Comparative and general, Morphology, Syntax, Word order


What has the author Franz Schmidt written?

Franz Schmidt has written: 'Symbolische Syntax' -- subject(s): Language and languages, Philosophy 'Logik der syntax' -- subject(s): Comparative and general Grammar, Logic, Syntax


What has the author Robert D Van Valin written?

Robert D. Van Valin has written: 'The syntax-semantics interface' -- subject(s): Comparative and general Grammar, Grammar, Comparative and general, Pragmatics, Semantics, Syntax