Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
How to calculate Compound Interest in Java? Compound Interest Calculator in Java Example Tutorial
How to check if a Number is Power of Two in Java? [Bitwise AND Example]
[Solved] How to count Vowels and Consonants in Java String Word? Example
[Solved] How to convert Hexadecimal to Decimal, Binary and Octal in Java? Example
How to create a Function to add two numbers in Java? Variable Argument Example Tutorial
Hello guys, if you are just starting with Java programming and wondering how to write a function to add two numbers in Java then you have come to the right place. In this Java program tutorial, we will add two numbers provided by the user on the command line. Write a Java program to add two numbers in Java is a common programming exercise for programmers and mostly asked in college exams, school homework, and Java courses as well.
[Solved] How to solve climbing stairs problem in Java? Example
In this article, we are going to be solving the stairs problem using java, After that, I shall be explaining the concept of Array. but before we start writing codes it is fine to have an understanding of the problem we are about to solve. Given the number of stairs and the number of times you can move your legs, we would see how many possible ways you can achieve the climbing of stairs. The image below shows different possible ways you can climb stairs. For instance, let us say we have 5 steps on the stairs. and you can either walk with 2 moves or 1.
How to Search an Element in Java Array with Example? ArrayUtils Tutorial
[Solved] How to solve a coin change problem in Java? Example
The coin change problem is one of the popular coding interview question and knowing how to solve this problem can help you during coding interview. It's also useful to learn a couple of tricks and data structure. This problem somewhat has to do with arrays, so we shall be discussing what an array is, But before we dive into this. we need to understand the problem. We are about to solve a coin problem by determining how many possible ways an amount can be paid. Suppose, Mary is a Businesswoman who deals with coin change.
How to print a Right Triangle Pattern in Java - Example Tutorial
Hello Java Programmers, here we are back again with a pattern based exercise. In the past, I have shared article on how to print pyramid pattern of stars in Java, Left Triangle Star Pattern, and Pyramid pattern of alphabets, and in this article, I will show you how to print a right triangle start pattern in Java. Pattern based exercises are great way to learn programming and coding as it encourage you to use logic and use essential programming constructs like loop and arrays.