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

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

Telehpone number validator reg expression

Telehpone number validator reg expression java

Telehpone number validator reg expression is below For a telephone number validator we need a reg ... 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

More differences between interfaces and abstract classes

interaces abstract class difference java

Differences between abstract classes and interfaces * Abstract classes can have variables that ar ... 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

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

Look Before you leap vs Easy to ask for forgiveness and permissions

LBYL EAFP java

There are two ways to write a program in Java 1.Look before you leap - check all the conditions ... Read More

Writing to a text file using try with resourcesJava

FileWriter I/O try with resources java

Try with resources is available since java 7. So in order to use try with resources we need to go to ... 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