An Introduction to Using Functions/Methods
with Examples in Java |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
length = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
Math
classsqrt
double
-valued
parameterdouble
void
Functions/Methodsvoid
Function/MethodSystem.out.println("Start Wearing Purple");
out
object in
the System
classprintln
String
parametervoid
)