Java Tutorial #10 — Loop logic / intro

Topics Discussed: While loops, do_while loops, counter controlled loops, loop syntax, loop scoping Source Code For Lesson 10: import java.util.Scanner; class Jtutorial1 { public static void main(String args[]){ Scanner input = new Scanner(System.in); int i=0;//initialize a new variable for use as a counter while(i < 10){//While the variable is less than 10 System.out.println(i);//Print the current... » read more

Java Tutorial #11 — For loops / nested for loops

Note- This video is really hard, the next video is way easier to understand than this one… sorry about that, I got excited Topics Discussed: For loops, nested for loops, nested for loop structure, nested loops Source Code Available Here For loops For loops are similar in idea to a while statement, except that it... » read more

Java Tutorial #12 — Loops in action, and number casting

Taking a step back to sanity on this one, sorry about the difficulty of lesson 11 Topics Discussed: Using a loop to count something for us. Source Code for Lesson 12: import java.util.Scanner; class Jtutorial1 { public static void main(String args[]){ Scanner input = new Scanner(System.in); /* int total=0, countDown=0; double average=0; do{ System.out.println("Enter a... » read more

Java Tutorial #13 — More loops! Sentinel and break;

Topics Discussed: More loop practice, sentinel / dummy record loops, breaking out of loops Source Code for Lesson 13: import java.util.Scanner; class Jtutorial1 { public static void main(String args[]){ Scanner input = new Scanner(System.in); int i=0, j=0; //Dummy record / sentinel controlled loop. while (i < 100){ j = i*5; System.out.println("The value of i is:"... » read more

Java Tutorial #14 — Case logic / structure / breaking.

Topics Discussed: Case logic, case structure, case scope, breaking, case fallthrough, case study calculator Source Code Available Here Case Logic Case logic is tremendously useful in cases where you might have something like a menu where a user selects something from a set of options. The basic syntax of a case is as follows: int... » read more