Here you will get java program for palindrome number. A number is said palindrome if its is equal to its reverse. For example, 131 is palindrome while 123 is not. Below I have shared two ways to check palindrome in java. Java Program for Palindrome Number Method 1: In this method we will reverse the …
Here you will get program to convert binary to decimal in Java. We can convert a binary number into decimal in two ways, using Integer.parseInt() method and by using your own logic. Below I have shared program for both the methods. Also Read: Convert Decimal to Binary in Java Convert Binary to Decimal in Java Method …
Here you will get program for armstrong number in java. A number which is equal to the sum of its digits raised to the power n is called armstrong number. Here n is the total digits in the given number. Example: 9 is an armstrong number as n = 1 and 91 = 9. 153 is an …
In this tutorial you will learn about static keyword in Java with example code. Static keyword in java mainly used for memory management process. In Java static keyword can be used in following cases. With Variables With Methods With Blocks With Nested Class Lets discuss each of them one by one. Static Keyword in Java …
Here you will get java program to calculate area and circumference of circle. Formula used: Area of Circle = 3.14 * radius2 Circumference of Circle = 2 * 3.14 * radius
Here you will get program for fibonacci series in java using loop and recursion. The series in which next term is calculated by adding previous two terms is called fibonacci series. Example: 0 1 1 2 3 5 8 13 21 34 Program for Fibonacci Series in Java Using Loop
Here you will get java program to reverse a number with while loop and recursion. When we divide a number with 10 then the remainder is the last digit of number and quotient is the number without last digit. / operator is used find quotient and % operator is used to find remainder. We use …
Here you will get java program for leap year. Condition for Leap Year A year completely divisible by 400 is leap year. A year completely divisible by 4 but not divisible by 100 is leap year. For example: 2000, 2008, etc are leap year while 1900, 1997, etc are not leap year. Java Leap Year …