getOrDefault method in Java

getOrDefault java

getOrDefault is a useful method that we can use on map s in Java. We give two arguments here. The fi ... Read More

Creating temporary files in java

Creating temporary files java

We can create temporary files in Java like in the code below Here first argument is the name ... Read More

Parents and child equal in java

parents and child equal java

If we have two classes Dog(parent) and Labrador(child) as below ``` public class Dog { ... Read More

Collections in Java

collections java

Collections lie in java.util package * ArrayList and LinkedList extend List Interface. * And Li ... Read More

Regular expression ecample for postal code

Regular expression ecample for postal code java

Below is the req expression to match 5 digits and then we put () and inside those braces we put - t ... Read More

Wrapper classes in Java

wrapper classes java

Wrapper Classes are used to convert from primitive data types to objects or vice versa Example i ... Read More

Getting file attributes in java

file attributes java

``` try { // To get File metadata or File attributes. i.e file size , last modified da ... Read More

Unmodifiable collection in Java

Unmodifiable collection java

The below command is used to return a unmodifiable list,map or set which can't be modified so origin ... Read More

Regular expression quantifiers in java

Regular expression quantifiers java

Quantifiers are used to replace how many times a character is present in the String ``` Str ... Read More

Input and output byte streams in Java

reading and writing data using byte streams java

* We know that Buffered reader and writers read and write data in big chunks * Byte Streams can be ... Read More