Finding the largest and smallest numbers in an array is a common programming problem. This post describes how to write a Java program to find the largest or the smallest element in a one-dimensional array. In Java Video Lecture 16, …
A single dimensional array or a one-dimensional array can hold more than one element. Using an array, one can avoid the use of too many variables to store the same data types. As an example, a programmer can use an …
Becoming skilled at anything requires determination and perseverance. Gaining expertise in programming is no different. I teach around one hundred students every year at the University of Texas at El Paso. I generally teach Programming, Data Science/Mining, and Algorithms courses. …
Java do-while loop is one of the three looping techniques available with the language. The other two loops are: for loop and while loop. do-while is a little bit different than for or while loops. In the “for” or “while” …
Java has three types of loops: (1) for loop, (2) while loop, and (3) do-while loop. This post focuses on while loops in Java. In the video-lecture associated with this post, we compare side-by-side for loops and while loops. While …
As stated in the previous video lecture, nested loops refer to the repetition of another repeated task. The nested loops we discussed in the last lecture were not dependent on each other in determining how many times a loop should …
Nested looping refers to a loop inside another loop. Many applications require to loop over a repeated task. Nested looping is a solution to aid such repetitive tasks. As an example, consider printing ten lines on the terminal, where each line contains twenty asterisks, as shown below.
In the previous video lecture, we learned how to repeat a segment of code using a for-loop. The segment we used for repetition was small. In the following video lecture, we incorporate an if-else structure inside the scope of a …
Repetition of segments of codes is an essential part of programming. Repeating the execution of a code segment, a programmer can reduce the size of the code as well as solve problems that require iterations of similar computations for an …










