String equality using == and .equals methods

Strings == equals java

String is a non mutable class i.e once we create an object of String class like we created in the e ... Read More

Creating files and directories in java

Creating files and directories java

Code to create files ,directories and to create multiple files is below ``` try { ... Read More

More collection methods in java

collection methods java

* By using methods provided by java.util.collections we can create a shallow copy of another ArrayLi ... Read More

Reading and writng objects to a file using nio in java

reading writing objects nio java

* Here we will be using read and write files using java.nio package which came available in java 1.4 ... Read More

Using file seperators in java

file seperators java

In a real world examples we will use File separators instead of providing backslashes like we used i ... Read More

File paths using java nio in java

file paths using nio java

* Absolute file path looks like this --> C:\downloads\file.txt is an absolute path where C is the r ... Read More

Walking down a file tree using SimpleFileVisitor in java

Walking down a file tree using SimpleFileVisitor java

* If we want to search for all files in a given directory named Dir2 folder there is an issue.Dir2 ... Read More

Artifacts or jar files in java

artifacts jar java

We can go to intellij and create a new java project. Choose a location where we want to save our pro ... Read More

Differences between interfaces and abstract classes

abstract class interface java

And differences between abstract classes and interfaces are - * A child class can only extend one c ... Read More

To find if a file or directory exists uning java nio

To find if a file or directory exists uning java nio java

* One thing to note regarding Path class is ,it never knows if a path actually exists or not. * So ... Read More