Java Tutorial #15.1 / 15.2 — Introduction to and using arrays

Topics Discussed: Arrays, subscripts, iterating through arrays Source Code Below   15.2 Topics discussed: Same as above Source Code for Lesson 15-1 / 15-2 import java.util.Scanner; class Jtutorial1 { public static void main(String args[]){ Scanner input = new Scanner(System.in); //int i= 5; i(5); //int anArray[] = new int[5]; //anArray[ | | | | ]; //anArray[0|0|0|0|0];... » read more

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 <SkyeShatter@gmail.com> */ 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 #17 — Encapsulating programs // including more than 1 file

Topics discussed: Encapsulation by separating methods into new files. Source Code Available Here Program encapsulation The concept of program encapsulation is simple: break things down into their component parts so when something breaks, it’s easy to track, and easier to fix. The more ‘parts’ you break your program into (via methods) the easier this becomes.... » 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

Lesson 21- Class Wrappers + Variable conversion

Topics Discussed: Class Wrappers and changing types using toString / parseint / parseDouble Source code for Lesson 21: class testing{ public static void main(String[] args){ //double d = null; //Can't do this, double is a primative type Double d = null; int k=5; if(k < 5 ) { d+=10; } else{ k+=10; } if(d==null){ //do... » read more