lecture10-methods

lecture10-methods - h h modifier returnType methodName(list...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: h h modifier returnType methodName(list of parameters) { collection of statements; } methodName(list of parameters) int public static void main(String args) { int i = 5; int j = 2; int k = max(i, j); System.out.println( System.out.println( "The maximum between " + i + " and " + j + " is " + k); } public static int max(int num1, int num2) { int result; if (num1 > num2) result = num1; else result = num2; return result; } public static void main(String args) { int i = 5; int j = 2; int k = max(i, j); System.out.println( System.out.println( "The maximum between " + i + " and " + j + " is " + k);...
View Full Document

This note was uploaded on 04/03/2010 for the course CS CS 170 taught by Professor Eugeneagichtein during the Fall '09 term at Emory.

Page1 / 41

lecture10-methods - h h modifier returnType methodName(list...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online