# Category Archives: Java

Java programs,Java concepts,

## Java program to check whether string is palindrome or not

In earlier post we have discussed how to check whether a number is palindrome or not.In today’s post we shall check whether a string is palindrome or not.For this we shall use built in functions to reverse a string and … Continue reading

## JAVA program to maintain a BOOK SHOP

Does any one get a doubt how a librarian maintains the list of books available in the library?Today we shall get in detail about this and compile a program to maintain a book shop.First of all we need to know … Continue reading

## Java program for composite numbers

It is a simple program…Here we need to find composite number which is defined as a number which has a positive number has divisor other than 1 and itself…In a simple way we can define a composite number has a … Continue reading

## Multiplication of two matrix in java

In our last post we have learnt about the addition of two matrices.Today we shall learn about the multiplication of two matrices.Multiplication of two matrices is little complicated as compared to the addition of the two matrices.One of the basic … Continue reading

## Addition of two matrix in JAVA

In this post we focuses on adding two matrices.Before adding two matrices we need two matrices of same order.i.e is number of rows,columns in matrix 1 should be equaled to number of rows,columns in matrix 2.The procedure for adding two … Continue reading

## Java program to find repeated digits in a number

In our earlier post we learn about redundant digits in an array.Today we shall how to find the redundant digits in any given number.This program is bit complicated since we use lot of if,for,while conditions. The process of finding the … Continue reading

## Java program to check Armstrong number

A number is called as ARMSTRONG number if,sum of cube of every digit present in the number is equal to the number itself then that number is called as armstrong number.For example the 153 is a armstrong number because 1^3+5^3+3^3=153. … Continue reading

## Java program to find duplicate elements in an Array

Today we shall learn how to detect the repeated digits in a given array.The main logic behind this is we need to check every number with other numbers.That is first we need to find the length of the given array … Continue reading

## JAVA program to print Multiplication Table

Today we shall program another simple and basic problem.In our childhood many of us find difficulty in learning the Multiplication tables.Now, we shall take revenge on them by writing the program.Let us consider that our program takes two values as … Continue reading

## JAVA program to print numbers in PYRAMID design

We all like the pyramids by the way they are built and the enormous size of those pyramids.Today we shall apply it our programming and print the numbers of our desired range.The output of today’s program may look like this. … Continue reading

In our earlier post we learnt about method overloading.Today we shall apply that technique to overload constructors.A method is said to be constructor if the name of the method and the name of the class where it presents is same.During … Continue reading

Method in any programming language are those which reduce the burden of main method.Many of us got a problem where we can’t define two methods with the same name.Today we shall find a solution and write a sample program to … Continue reading

## Prime number program in JAVA

Let us make another basic program in JAVA.i.e finding the prime numbers in the given list.We know that a number is called as prime number if it is divisible by one and itself only.Therefore to check whether a number is … Continue reading

## Palindrome in Java

By definition a number is said to be palindrome,if the reverse of the number is equal to the same original number.i.e we need to find the reverse of the given number and we should check it with original number.This is … Continue reading

## Sum of digits in JAVA

Here is a traditional problem…..Finding the sum of digits of given number.It is not a difficult one, just we need to find the logic in it.Logic is we need to get the digits of the given number using modulus operator.Now, … Continue reading

## Fibonacci series in JAVA

By definition Fibonacci series in defined as the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two.i.e the nth number is obtained by adding the n-1 and … Continue reading

Posted in Java | | 1 Comment

## Data types

In every programming language storing of the data is crucial and data types play a vital role in storing the data.Java is no exception for this.Generally data types are divided into two types. There are numeric and character data type. … Continue reading