Description Program to compare boolean values. Example In this example we are going to see how to compare two boolean values by using compareTo() method… [Read More]
Archives for July 2014
Cast Boolean Object to boolean in Java – booleanValue() Method
Description Program to convert Boolean object to boolean primitive in java Example class BooleanObjToBooleanPrim { public static void main(String[] args) { // Creating an object… [Read More]
Convert boolean Primitive to Boolean object in Java
Description Program to convert boolean primitive to Boolean object Example class BooleanPrimToBooleanObj { public static void main(String[] args) { boolean bvar = true; /* Method… [Read More]
Convert String to boolean primitive in Java: parseBoolean() method
Description How to convert String object to boolean primitive in Java. Example: Complete conversion code In this example we are converting string to boolean using… [Read More]
Convert String Object to Boolean Object in Java
Description How to convert String object to Boolean object. Example In this example we are gonna see two methods of String to Boolean object conversion…. [Read More]
@Deprecated annotation in java
@Deprecated annotation is used for informing compiler that the particular method, class or field is deprecated and it should generate a warning when someone try… [Read More]
@Override annotation in Java
@Override annotation is used when we override a method in sub class. Generally novice developers overlook this feature as it is not mandatory to use… [Read More]
Sorting float array in Java example
In this tutorial we are gonna learn how to sort a float array. import java.util.Arrays; class SortingFloatArrayExample { public static void main(String[] args) { //… [Read More]
Sorting double array in Java example
import java.util.Arrays; class SortingDoubleArray { public static void main(String[] args) { // Creating a Double Array double[] doubleArray = new double[] { 13.1, 2.5, 2.2,… [Read More]
Sorting char array in Java example
In this example we are sorting a char array. We have demonstrated two types of sorting in the program 1) Complete sorting using sort(char[] a)… [Read More]
Sort byte array in Java
This is the example of sorting a byte array in Java. Here we have done two types of sorting 1) complete sorting using sort(byte[] a)… [Read More]
Java – Finding minimum and maximum values in an array
In this example we are finding out the maximum and minimum values from an int array. class MinMaxExample { public static void main(String args[]){ int array[]… [Read More]
Random shuffling of an array in Java
import java.util.Arrays; import java.util.Collections; import java.util.List; class ShuffleArrayExample { public static void main(String[] args) { // String Array String[] stringArray = new String[] { “FF”,… [Read More]
Sort an Array in Descending (Reverse) Order – Java
The previous tutorial was all about sorting an array in ascending order. In this post we are going to learn how to sort an array… [Read More]
How to sort an Array in Java
This is the example of sorting an Array in java. Here we have two arrays, one is an integer array and another one is a… [Read More]
- 1
- 2
- 3
- …
- 5
- Next Page »