Bubble sort algorithm in java with example

  Java Program to sort array using bubble sort package com.instaceofjava;  public class BubbleSortExample{    int[] array={4,2,5,6,9,1};   int n = array.length; int k;   for (int m... read more ?

AtomicInteger in Java

Java.util.concurrent.atomic package provides very useful classes that support lock free and thread safe programming. The main use of this class is an int value that may be updated... read more ?

How to create immutable class in java

In Java String and all wrapper classes are immutable classes. So how to create custom immutable class in java? Lets see how to make a class object immutable.... read more ?

Java Program to find Sum of Digits

1. Java Program to find sum of digits without using recursion. package com.instaceofjava; import java.util.Scanner;   public class SumOfDigits {   public static void main(String[] args) {  ... read more ?

Swap two numbers without using third variable

1. Java Interview Program to Swap two numbers without using third variable in java (adsbygoogle = window.adsbygoogle || []).push({}); package com.instaceofjava;   public class SwapTwoNumbers {   public... read more ?

HashSet class

hashset

Hierarchy of HashSet class:    public class HashSet<E>         extends AbstractSet<E>            implements Set<E>, Cloneable, java.io.Serializable (adsbygoogle = window.adsbygoogle || []).push({}); Key points: HashSet is... read more ?

Reverse words in a String

1. Java Interview Program to Reverse words in a string package com.instaceofjava;   public class ReverseString {   public static void main(String[] args) {   String strng= "Instance... read more ?

Select Menu