Tag Archives: Java-Library

Java is one of the most recommended languages in competitive programming (please refer a previous article for more details) Java Collection framework contains lots of… Read More
Byte class is a wrapper class for the primitive type byte which contains several methods to effectively deal with a byte value like converting it… Read More
The nextBoolean() method of java.util.Scanner class scans the next token of the input as a Boolean. If the translation is successful, the scanner advances past… Read More
The nextDouble() method of java.util.Scanner class scans the next token of the input as a Double. If the translation is successful, the scanner advances past… Read More
The nextLong(radix) method of java.util.Scanner class scans the next token of the input as a long. If the translation is successful, the scanner advances past… Read More
The nextFloat() method of java.util.Scanner class scans the next token of the input as a Float(). If the translation is successful, the scanner advances past… Read More
The nextInt(radix) method of java.util.Scanner class scans the next token of the input as a Int. If the translation is successful, the scanner advances past… Read More
The nextByte(radix) method of java.util.Scanner class scans the next token of the input as a Byte. If the translation is successful, the scanner advances past… Read More
The nextBigInteger(radix) method of java.util.Scanner class scans the next token of the input as a BigInteger. If the translation is successful, the scanner advances past… Read More
The locale() method of java.util.Scanner class returns this scanner’s locale. Syntax: public Locale locale() Parameters: The function does not accepts any parameter. Return Value: This… Read More
The ensureCapacity() method of java.util.ArrayList class increases the capacity of this ArrayList instance, if necessary, to ensure that it can hold at least the number… Read More
The clear() method of java.util.LinkedHashSet class is used to remove all of the elements from this set. The set will be empty after this call… Read More
The nextLine() method of java.util.Scanner class advances this scanner past the current line and returns the input that was skipped. This function prints the rest… Read More
The contains() method of java.util.LinkedHashSet class is used to return true if this set contains the specified element otherwise false. Syntax: public boolean contains(Object o)… Read More
The nextBigDecimal() method of java.util.Scanner class scans the next token of the input as a BigDecimal. If the next token matches the Decimal regular expression… Read More