We, Dr. Shahriar Hossain and Dr. Monika Akbar are developing a Java programming course for beginners. All the video lectures are linked from this page. Subscribe to receive notifications of new posts.
Subscribe to our YouTube Channel to receive notifications when we post YouTube videos:
We hope that you will enjoy the video lectures and the exercises we post.
This post is a continuation of the previous video lecture on Recursion. The current post and the associated video lecture explain more on recursion in Java. We target the following problem — how to compute the summation of all the integer numbers between 1 and n, using recursion. Recall from the previous post that we […]
This article discusses the basics of recursion in Java. We will discuss the theory of recursion, how we can write a recursive method in Java, and how to trace a recursive program. We are already familiar with how to use methods in Java. A method is a code snippet that you can call an arbitrary […]
This article covers details on methods. It explains why we need to use methods in our programs, how to pass data to a method using parameters, and retrieve information from it via a return statement. A method is a block of code to perform some specific tasks. One method can be called by another method […]
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, we gave two exercise questions on one-dimensional arrays. The exercise questions are as follows. Write […]
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 array variable to refer to the GPA scores of many students. In this article, I […]
Printing the pyramid pattern of stars is a common practice in learning any programming language. In this post, we will learn how to print the pyramid pattern of stars in Java. The program output for a pyramid of ten lines of stars is provided below. Video lecture explaining how to print a pyramid of stars […]
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” loop, generally, a condition is checked in the beginning to realize whether the execution should […]
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 loops in Java The while loop in Java has the following structure. The variable condition […]
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 iterate. In the exercise of this lecture, we demonstrate how we can ensure that the […]
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 for-loop. We use a simple problem to develop this practice scenario. The Problem used in […]
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 arbitrary number of times. Java provides three syntaxes for repetition: for loop, while loop, and […]
In the previous video-lecture, we described how if-else if-else statements work. We provided an exercise with the video-lecture. In the video with this article, we provide a solution to the exercise. Tracing a program with if-else if-else statements In the following video, we introduce a technique called tracing that we did not cover before. Tracing […]
The article explains if-else if-else control statements in Java. It provides a video and relevant exercises.
A boolean variable is capable of holding either “true” or “false.” A computer program may use one bit only to store the status “true” or “false.” You might already know that the smallest memory unit of the computer is a “bit.” Therefore, a boolean variable uses as little memory as possible to store the information […]
The article describes the arithmetic operators in Java programming language. It provides a video lecture, which uses simple programming examples to explain the concepts.
The article covers user input in Java for different data types. It uses a simple example and great details for beginners. We also provide a YouTube video in this article that describes the fine details of how to write the program.
I am writing this article in support of the video we made on the topic — Getting User Input in Java. The video helps new learners by providing explanations on how to develop a simple calculator program. The user of the program types on the keyboard to enter two numbers. The program captures the two […]
I am writing this article today in support of the video I made on Variables in Java. The video describes a little bit of theory and then demonstrates how you can use multiple variables in your program. I used simple applications — addition and subtraction of two numbers — to describe how to use variables […]
Writing the first program using Java can be intimidating, especially if someone is learning a programming language for the first time. Please do not be afraid or discouraged. If you saw someone write programs in the speed of light — especially in movies when there are only ten seconds left to a terrible happening, which […]