answersLogoWhite

0

How is a method define?

User Avatar

Anonymous

14y ago
Updated: 8/18/2019

[Access Specifier] [Modifier] return-type function-name(Parameter list)

{

body of the function

}

Example:

public override void printHelloWorld(int count)

{

for(int i = 0; i < count; i++)

{

System.out.println("Hello world!"); }

}

User Avatar

Wiki User

14y ago

What else can I help you with?