










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These are the Lecture Slides of Java Programming Language which includes Applet Class, Passing Parameters to Applets, Conversions, Applications and Applets, Running a Program, Applet, Application, Mouse Event, Keyboard Event etc. Key important points are: Methods, Declaring Methods, Calling Methods, Passing Parameters, Pass By Value, Overloading Methods, Method Abstraction, Recursion, Method Structure, Declaring Methods
Typology: Slides
1 / 18
This page cannot be seen from the preview
Don't miss anything!











public static int max(int num1, int num2) { int result = 0; if (num1 > num2) result = num1; else result = num2; return result; }
modifier returnValueType
methodName parameters
return value
method body
method heading
TestMax (^) Run
double max(double num1, double num2) { if (num1 > num2) return num1; else return num2; }
TestMethodOverloading (^) Run
Method Signature
Method body
Black Box
Optional Input Optional return value
Returns e raised to the power of a.
Returns the natural logarithm of a.
Returns a raised to the power of b.
Returns the square root of a.
Example 4.4 Computing Mean and Standard Deviation
Generate 10 random numbers and compute the mean and standard deviation
ComputeMeanDeviation (^) Run
n
i
1
1
2
−
= n
x mean deviation
n
i
i
PrintCalendar (^) Run
ComputeFactorial (^) Run
ComputeFibonacci (^) Run