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 […]
https://computing4all.com/wp-content/uploads/2019/08/Java-for-loop-with-if-else.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-08-10 20:48:292019-08-10 20:48:33An exercise on for-loops and if-else: Video Lecture 10
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 […]
https://computing4all.com/wp-content/uploads/2019/07/Java-for-loop.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-07-27 04:52:292019-07-27 04:52:35An introduction to Java for loop: Video Lecture 9
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 […]
https://computing4all.com/wp-content/uploads/2019/07/tracing-if-else-if-else-statements.jpg315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-07-22 06:17:192019-07-22 06:17:26An exercise, its solution, and tracing: if-else if-else in Java: Video Lecture 8
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 […]
https://computing4all.com/wp-content/uploads/2019/06/Arithmetic-Operations-in-Java.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-06-23 18:37:322019-06-23 18:37:39How to Use Arithmetic Operators in Java: Video Lecture 5
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.
https://computing4all.com/wp-content/uploads/2019/06/Data-Types-and-Getting-User-Input-in-Java.png315560Monika Akbarhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngMonika Akbar2019-06-19 06:14:022019-06-19 06:14:08More on Data Types and User Input in Java: Video Lecture 4
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 […]
https://computing4all.com/wp-content/uploads/2019/06/Getting-user-input-in-Java.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-06-14 03:59:122019-06-14 03:59:18Getting User Input and Making a Calculator Using Java: Video Lecture 3
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 […]
https://computing4all.com/wp-content/uploads/2019/06/Variables-in-Java.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-06-11 02:33:232019-06-11 21:20:37An Introduction to Variables in Java: Video Lecture 2
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 […]
https://computing4all.com/wp-content/uploads/2019/06/Your-first-Java-program.png315560M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-06-05 21:01:222019-06-11 21:19:48How to Write Your First Program Using Java: Video Lecture 1
When someone goes to a college to study Computer Science, she/he does not have to worry much about what programming languages to learn because the degree plan already contains an outline of almost all the required courses. Today, we are going to answer the question of which programming language one should learn if she/he does not […]
https://computing4all.com/wp-content/uploads/2019/05/What-programming-language.png315560Monika Akbarhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngMonika Akbar2019-05-30 03:01:062019-05-30 03:01:13What programming language should I learn first?
The practice of computing has become widespread over the last decade. Many people in non-computing disciplines now code using standard programming languages. Learning to code is not solely a curriculum-based effort anymore. Being able to write computer programs is an excellent skill because of many reasons. The article describes some of these benefits. The article […]
https://computing4all.com/wp-content/uploads/2019/05/learning-to-code.png450800M. Shahriar Hossainhttps://computing4all.com/wp-content/uploads/2019/05/computing-for-all-logo-background-clean-300x92.pngM. Shahriar Hossain2019-05-26 20:44:592019-05-27 03:03:38Learning to Code: Who should Learn it and Why