Marker Interface and clone example

marker clone interface java

Marker Interfaces- A marker interface is one which has absolutely nothing in them.They have no meth ... Read More

Inheritance in java

inheritance java

When a child class extends a parent class it is called inheritance. A child class can access class ... Read More

HashMap,LinkedHashMap and TreeMap in Java

hashmap linkedhashmap treemap java

If we use hashmap items will not be added to the map in an order ``` Map myMap = new Hash ... Read More

Reading and writing data using java nio

reading writing nio java

* java.nio package came available in java 1.4 to read and write data to a file * If we compare jav ... Read More

Inner nested class in java

inner nested java

We can create a class within a class and the inner class can have its own methods and variables. ... Read More

Reading and writing objects to a file in Java

Reading and writing objects Serialisation java

*If we a class has 20 fields like id,location,exits etc etc then instead of writing all fields to a ... Read More

More regular expression examples

More regular expression examples java

More examples of regular expressions in java ``` String challenge1 = "I want a bike."; /* ... Read More

Arrays in Java

arrays java

Array are used to hold a list of values ,like a list of Strings,ints etc. Arrays have a fixed length ... Read More

Multiple catch blocks and finally block in java

multiple catch blocks finally java

For a try block we can have multiple catch blocks.Only thing to be noted for the catch blocks is tha ... 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