Java Program To Print The Fibonacci Series Up To A Given Number of terms
In this tutorial, we will see a Java program to print the Fibonacci series up to a given number of terms.
What is the Fibonacci Series?
Fibonacci Series is the sequence of numbers in which each number in the sequence is equal to the sum of two numbers before it.
Fibonacci Series:
0, 1, 1, 2, 3, 5, 8, 13, 21………….
Java Program To Print The Fi...
Java Program To Check If The Given Number is Prime or Not
In this tutorial, we will see a Java program to check if the given number is prime or not.
What is a Prime Number?
A number that can be divided exactly only by itself and 1.
For example 7, 17 and 41.
Java Program To Check If The Given Number is Binary Or Not
public class PrimeNumber {
public static void main(String[] args) {
in...
Java Program To Check If The Given Number is Binary Or Not
In this tutorial, we will see a Java program to check if the given number is binary or not.
We can check if the given number is binary or not by the following ways
Checking if the number contains a 1 or 0 digits by the reminder and divide method
Convert the number to String
1. Java program to check if the given number is binary or not b...
Java Program To Check If the given Number Is Palindrome or Not
In this tutorial, we will see a Java program to check if the given Number is palindrome or not.
Java Program To Check If the given Number Is Palindrome or Not
/**
* A Java program to check if the given number is a palindrome or not.
* @author coderolls.com
*/
public class PalindromeNumber {
public static void main(String[] args) {
...
Java Program To Check If the given String Is Palindrome or Not
In this tutorial, we will see a Java program to check if the given String is palindrome or not.
Java Program To Check If the given String Is Palindrome or Not
/**
* A Java program to check if the given string is palindrome or not.
* @author coderolls.com
*/
public class PalindromeString {
public static void main(String[] args) {
...
Java Program To Print An Array.
In this tutorial, we will see how to print an array In Java.
We can print an array using the following 3 ways
Print an array using for loop
Print an array using Arrays.toString()
Print a multi-dimensional array using ` Arrays.deepToString()`
Print an array using Java 8 Streams
1. Print an array using for loop
Here, we are iterating...
Java Program To Check If the given String Is A Number or Not
In this tutorial, we will see a Java program to check if the given String is a number or not.
We can check it using the regex expression.
Java Program To Check If the Given String is Number or Not Using Regex Expression
In the below program, we have simply used the regex expression to check whether the given string is numeric or not.
The reg...
Java Program To Calculate Sum Of All Digits Of A Number
To calculate the sum of all digits of a number
First, we will get a reminder of the input number by the modulo operator (%) and add it to the sum variable.
Second, we will divide the input number by 10 and assign it again to an input number variable.
We will repeat the above process until the input number is not equal to zero.
At the e...
99 post articles, 12 pages.