Description Program to add all the elements of a List to the LinkedList using addAll() method of LinkedList class. Example import java.util.ArrayList; import java.util.LinkedList; import… [Read More]
Get absolute value of float, int, double and long using Math.abs in Java
Description In this tutorial we are gonna see a program to find out the absolute values of float, int, double and long variables in java…. [Read More]
Boolean.hashCode() Method in Java
Description Program to get hash code for Boolean object. We are using hashCode() method of Boolean class for this purpose, it returns integer 1231 if… [Read More]
Compare boolean values in java – compareTo() Method
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]
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]
- « Previous Page
- 1
- …
- 107
- 108
- 109
- 110
- 111
- …
- 150
- Next Page »