Following code implements concept of Virtual Memory using Java