GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing syntaxdb.com — Standard Methods in Java - SyntaxDB - Java Syntax Reference
LanguageVersion: SE 8Categories
Object Oriented ProgrammingStandard Methods in JavaA method is a block of code that can be called from another location in the program or class. It is used to reduce the repetition of multiple lines of code. The return statement concludes the execution of the block of code, returning something of type provided in the method header, or null (void method). SyntaxNotesmethodName is defined by the programmer, dataType is the data type of the result from calling the method, and modifier is the access modifier. 'Public' allows calling of the method using the object, while 'private' methods can only be called with other methods within the class. methodParameters contain data used within the method, stored using variables. Parameters are defined as: (dataType parameterName), which is the data type of the input parameter and the name of the parameter as seen within the method. There can be multiple parameters separated by a comma. The method can only access global methods and variables, ones passed into the method, as well as ones within the same class. Within classes, these methods are known as 'Instance Methods', because they are accessed through an object instance of the class. Example
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |