List of java numbers programs with easy explanation

In this tutorial ,we will learn about some important programs related to numbers.It is basic programs which is asked by the interviewer for both the fresher and experienced candidates.  1.Write a program of palindrome number in java Output Number is a palindrome 2.Write a program of sum of natural numbers in java The positive integer … Read more List of java numbers programs with easy explanation

LIST OF JAVA COLLECTION FRAMEWORK PROGRAMS

Collection framework in java is a collection of classes and interfaces. Program 1: Write a program to store the element in the ArrayList. Output: Note: Program 2: Write a program to store five student name and their roll number. Here we will store student name and roll number in the ArrayList.S Output: Program 3: Write … Read more LIST OF JAVA COLLECTION FRAMEWORK PROGRAMS

List of Java String programs

String is the collection of characters,but in java string is object which is immutable means (not changeable). program 1: Write a program to print the string in java. Output: program 2: Write a program to find out the length of the string. Suppose “suman” is string the length shoulde be 5. Output: Program 3: Write … Read more List of Java String programs

List of Java Array Programs

1.Write a program to find largest element in the array. In the below code we will write the logic of finding the largest element in the array. suppose input is given 2 ,4, 9, 10 .Output would be 10. Output: Explanation: 2.Write a program to find smallest element in the array. In the below code … Read more List of Java Array Programs

Write a palindrome number program in java

First we know that,what is palindrome number ? palindrome number is a number when it reverse value must be same. Example, suppose number=121,when reverse 121 then value will be 121. ie 121 is palindrome number. Example,suppose number=123,when reverse 123 then value will be 321.ie 123 is not palindrome number. Let’s Start public class PalindromeNumberProgram { … Read more Write a palindrome number program in java

How to swap two numbers in java using “*” and “/” operator

I consider that you have basic knowledge of core java and you know that how to make class in java. Let’s start public class SwapTwoNumbers { public static void main(String[] arg) { int a=10,b=20; int multiply=a*b; //Here multiply a and b ,means multiply=200 int a=multiply/a; //Here multiply value is 200 and a value is 10 … Read more How to swap two numbers in java using “*” and “/” operator