Another group pattern example in java

Another group pattern example java

We know that we can use group patterns to print the occurence of a particular pattern in a String. W ... Read More

LinkedLists in java

Linkedlists java

LinkedList vs Arraylist If we look from outside we may not find much difference between Arraylist ... Read More

Access modifiers in java

access modifiers java

Access modifiers and Scope Types of access modifiers 1.Public - can be accessed in any Class ... Read More

Collections in Java

collections java

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

Iterating over map in Java

iterating over map java

We know we can iterate over a map in java like below.Here languages is a map ``` for(Strin ... Read More

Creating our own exception classes in Java

creating our own exception classes java

We can even create our own exception class in java. Our own exception class should always extend Ex ... Read More

Reading and writing data completely using java nio

reading writing completely with nio java

We have seen that we can create path instances and then we can create FileWriter and FileReader inst ... Read More

Using file class vs path class to get paths in java

Using file class vs path class to get paths java

* We know that File class can also return the path of a File.So why did java come up with Path cla ... Read More

Copying files using java nio

Copying files using nio java

Code to copy file1.txt from examples folder and make a new copy in the same folder under the name fi ... Read More

More regular expressions for replaceAll( for digits ,alphabets,white spaces or just tabs)

More regular expressions for replaceAll( for digits alphabets white spaces or just tabs) java

Replaces any numbers with x ``` System.out.println("abCdeFGH123456789".replaceAll("[0-9]", ... Read More