Java Tutorial #16 — Introduction to methods

Topics Discussed: Methods, passing by value, method arguments, return types, void Source Code for Lesson 16: /** * * @author Damien Bell <> */ import java.util.Scanner; class Jtutorial1 { public static int prodSum(int x, int y){ int z=0; System.out.println("The product is: " +(x*y)); // produdct of our numbers z= x+y; return z; } public static... » read more

Java Tutorial #18 — Access Modifiers; Working with / around them

Topics discussed: Access modifiers, public, private, static Source Code Available Here Access modifiers Access modifiers are our way of sectioning off our program and making it harder to accidentally use / misuse methods not contained within the calling class. There are 4 access modifiers and they basically work like this: Public: Public as an access... » read more