MY JAVA LEARNING

This is a hobby site, where i keep stuff which i come across JAVA learning's.
It is not my own words. Its just like a collection of points from Textbooks / reference materials.
It is kind of college note.

Reference:
The complete reference. By Herbert Schildt
https://www.tutorialspoint.com/compile_java_online.php for execution
https://www.javatpoint.com/java-tutorial
https://www.tutorialspoint.com/java/java_overview.htm

coding guidelines: https://google.github.io/styleguide/javaguide.html

Contents:

1. INTRODUCTION 

2. JAVA FUNDAMENTALS

3. CLASS INTRODUCTION

4. PACKAGES & STREAMS

5.  COLLECTIONS

6.   LOGGING PPLICATION

7.  MULTI-THREADING & CONCURRENCY

8.  MISCELLANEOUS

9.   PRACTICE




--------------------------------------------------------------------------------------------------

1.  INTRODUCTION:


Founder of Java is James Gosling. It was initially called as 'Oak'.

Java is a programming language and a platform.  
Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own runtime environment (JRE) and API, it is called platform.



Application source code -> (byte code +  3rd party library) -> JVM
The output of a Java compiler is not executable code. Rather, it is bytecode. Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). programming language + runtime environment = (JSE) Java standard edition. Java development Kit (JDK) is a combination of  + JSE (standard library) + JVM.

Translating a Java program into bytecode makes it much easier to run a program in a wide variety of environments because only the JVM needs to be implemented for each platform. Once the run-time package exists for a given system, any Java program can run on it.

1.a     Philosophy of JAVA:
Portability: It works on principle of WORA (write once run anywhere)
Scalability.

APPLET : An applet is a special kind of Java program that is designed to be transmitted over the Internet and automatically executed by a Java-compatible web browser.
SERVLETS : A servlet is a small program that executes on the server. Just as applets dynamically extend the functionality of a web browser, servlets dynamically extend the functionality of a web server.

JUST(just in compiler) will help to generate the native executable code while compiling bytecode.
The main intention of java is "write once, run anywhere, anytime forever". Java also supports, RMI(Remote Method Invocation), which enables a program to invoke methods across a network.

1.b     OOPS-

The four oops principles are:
-> Encapsulation is the mechanism that binds together code and data from being arbitrarily accessed by the other code defined outside the wrapper.
Ex: access specifier, object & class
->  Inheritance  is the process by which one object acquires the properties of another object.
->  Polymorphism is a feature which allows one interface to be used for a general class of actions.
Ex: Overloading, overriding.
->  Abstraction Exposing the features, without having to know the inner details of implementation.
Ex: Abstract class + interface etc

Lexical issues: Whitespaces, Identifiers, Literals, comments, separators, keywords.

Below are the keywords:
Abstract, assert, Boolean, break, bye, case, catch, char, class, const, continue, default, do, double, else, enum, extends, final, finally, float, for, go-to, if, implements, import, instance of, int, interface, long, native, new, package, private, protected, public, return, short, static, strictfp, super, switch, synchronized, this, throw, throws, transient, try, void, volatile, while.

1.c     OVERVIEW of JAVA

Java classifications: Desktop applications, Enterprise applications, Cloud Java, Android

Desktop Applications:
Include the command line and interactive apps. Java started with GUI tools. First gui toolkit was
AWT:(Abstract windowing toolkit) based on native OS controls.
But it is having simple graphics primitives, which didnot fit in all OS.
SWING: Later, it came Pure java gui SWING. It was not using native OS controls. Cross-platform. Model -view controller.
But, it is bit slower than AWT. Its possible to mix swing and AWT in single application
javaFX: XML based Gui tool. it uses declarative UI's. FXML can be clubbed with CSS also with Graphics.
javaFX gui toolkit is separated from JDK and made as OpenJFX.

Enterprise Applications:
Java EE Api's are similar to JAVA SE. It support EE applications.
EE Api's include lot of libraries which run on JVM. Enterprise application is deployed on top of that.
Libraries like Web applications, Messaging, Data persistence(database), security, JSON/XML handling etc.
JAVA EE specifies only API. So, Java EE Application server is introduced to provide the implementation. It is container that runs on top of JVM and host EE applications.
Normally, java application run directly on JVM. But here, applications are run on Java EE application server. More than one app can run. Ex of Application servers: Tomcat(apache), WebLogic(Oracle), WebSphere(IBM), Wildfly(Red Hat)
Java EE is now reblended to Jakarta.ee .
Similar to Java EE, we have Spring Framework.

Cloud Java:
EE is monolith in architecture. Cloud Java is microservices. It splits app in multiple micro services and indepently deployed and scaled.
We have microframewroks supported for it. Some of the microframeworks are: Spring Boot, MicroProfile.
So, we can create a Spring Boot Application (or) Spring/ Netflix application on top of JSE to run on JVM.

Android Java:
Android java uses Java7. which eventually generates Bytecode -> bytecode cannot run on phone. It is converted into DEX(Dalvik Executable Format)
We have DVM (Dalvik virtual machine) to execute the DEX code. But JAVA != Android JAVA


1.d     POPULAR JAVA LIBRARIES:
Most of the java libraries are Open source and easily reusable. Spring framework was designed after J2EE. The key is "Dependency Injection". In normal java, the helper and utility class is coupled with the application class. With spring dependency injection container, instead of instantiating helper and utility and other class from the application class, it injects the class to the application class. So, with the help of injection container, it is possible to integrate and inject the classes to application class.

Popular libraries are broadly clssified as:
Utility : Google guava, Apache commons, Apache Log4J
Distributed systems : Netty, Akka, RxJava, Apache Camel
Data-access : Java database connectivity(JDBC) pools all the supporting database libraries.
Supported drivers are MySql, H2 etc.

Abstraction for JDFC are ORM, Sql DSL(domain specific language)


JAVA Data Processing:
Data Processor: Apache Hadoop, Apache Spark, DL4J(Deep Learning for Java)
       - describes, how to store and access
       Ex: in hadoop, we store unstructured data with data and node managers
Data Storage: Cassandra, Neon4J, ElasticSearch, HDFS(Hadoop Distributed File System)
      -How we store the data
      Ex: in cassandra, we store it as a JSON format.

IDE
        Eclipse, IntelliJ, Netbeans

Unit Testing:
First ever introduced testing framework is JUNIT.
Isolating dependency are mocking. This is achieved using mockito in JAVA.

Build Tools:
Maven and Graddle are well known build tools.
Maven:
Describe the build in XML file. Standard directory structure will be defined by default.
For dependency resolution, Maven contacts Maven central. It rebuilds entire project.
Graddle:
Build steps defined using Groovy scripts. Supports incremental builds. Can use Maven central.

Popular Static code analyser: Checkstyle, Spotbugs, PMD, SonarQube.

Alternative JVM Languages:
Groovy: scripting language.
Scala: combined OO + functional programming. Akka, spark written in scala.
Kotlin: For android development. Also runs in browser.

*****************************************************************************

2. JAVA FUNDAMENTALS

2.a     EXECUTION Steps:
Sample Code:
class Sample {
    public static void main (args[]) {
        System.out.println("Welcome to java");
    }
}
-> Name it as Sample.java
-> Javac Sample.java . This will generate the bytecode. Sample.class
-> Java Sample

        EXECUTION Environment:
-> Windows: the JRE path should be added in the PATH environment variable
-> Linux: sudo apt-get install default-jdk

        COMMENTS: 
There are 3 comments ways.
a. Line Comments: //
b. Block Comments: /* ...... */
c. Doc Comments:   /** ...... */

2.b     DATA TYPES, VARIABLES, AND ARRAYS
Java has 4 data types.
Interger:     byte(8), short(16), int(32), long(64)
Float:          float(32), double(64)
Char:          char stores a single unicode character
Boolean:     boolean
Literals:      octal is base8, with leading zero
                    Hexadecimal is base 16, with leading 0x
                    Float literal is appended with f or F.
                    Exponent​ is represented with e or E.
Strings:
In java, string is not array of character, it is object.
String stores sequence of unicode characters. String is immutable in Java. An immutable class is simply a class whose instances cannot be modified. All information in an instance is initialized when the instance is created and the information can not be modified. String Methods: charAt(), compareTo(), concat(),  contains(),  endsWith(), equals(), equalsIgnoreCase(), format(), getBytes(), getChars(), indexOf(), intern(), isEmpty(), join(), lastIndexOf(), length(), replace(), replaceAll(), split(), startsWith(), subString(), toCharArray(), toLowerCase(), toUpperCase(), trim(), valueOf()

StringBuilder :
It is a mutable string with ease access of the memory which saves the cost. It doesnot create space in memory for every new entry. This has all the functionalities of String. This can be converted to String object using toString() method. StringBuilder is suitable for long strings.

Primitive Wrapper Class:
It is a wrapper class that encapsulates, hides or wraps data types from the eight primitive data types, so that these can be used to create instantiated objects with methods in another class or in other classes. All primitive wrapper class are immutable. Conversion between primitive and the wrapper class is taken care implicitly in java.
Ex: Integer a= 100;
int b = a;
Primitive to Wrapper conversion uses "valueOf" method -> called as Boxing.
Wrapper to primitive uses "xxxValue" method. -> called as Unboxing. Ex: doubleValue.
String to primitive has "parseXxx" method, where Xxx is the primitive name.

2.c     OPERATORS
There are basic arithmetic operators, modulus, assignment, increment and decrement, prefix, postfix, bitwise, bitwise logical, relational, Boolean logical, ternary.
Arithmetic operations are done based on operator precedence.
Widening and narrowing the type conversions is possible. Be aware, of declaring and assigning to different variables.

Conditional Logic:
Relational operators: (>, >=, <, <=, ==, !=)
Conditional assignment/ternary: int y = x>y?x:y;
Logical operators: &AND, |OR,  ^XOR, !Negation
Conditional Logical Operators: &&, ||

2.d     CONTROL STATEMENTS

Following are the control statements available:

Single condition / single flow:
If, Nested if, If-else-if ladder, switch, Nested switch.

Iteration statement:
While, do-while, for, for-each.

Jump statement:
Break, goto, continue, return, exit.

*****************************************************************************

3. INTRODUCING CLASS

Class is a template for an object and an object is an instance of a class. The data or the variables defined inside the class is called instance variables / member variables.
If a class is public, then there should be a source file with same name. 'public class First' will have First.java file.

3.a     Difference b/w new and malloc in c++
     NEW                                                                    MALLOC
calls constructordoesnot calls constructors
It is an operatorIt is a function
Returns exact data typeReturns void *
on failure, ThrowsOn failure, returns NULL
Memory allocated from free storeMemory allocated from heap
can be overriddencannot be overridden
size is calculated by compilersize is calculated manually
But in java, new is the replacement for malloc.
'this' is the pointer reference to the current object.

3.b     Diff b/w delete and free
  1. delete is an operator whereas free() is a library function.
  2. delete frees the allocated memory and calls destructor. But free() de-allocate memory but does not call destructor.
  3. delete is faster than free() because an operator is always faster than a function.
      In general, every class need not specify the main() method. You can specify one, if that class is the starting point for your program. Further, applets don't require a main method at all.
A class declaration only creates template, it doesn't create an actual object. For accessing, the dot will link the object with the instance variable.
      The new operator dynamically i.e run time allocates memory for an object and returns a reference to it. The advantage is, the program can create as many or as few objects as it needs during the execution of your program.
When we assign one object reference variable to another object reference variable, we are not creating a copy of the object, we are only making a copy of the reference.
Constructor: It initializes an object immediately upon creation, before the new operator completes. Constructor doesn't have return type, not even void, because the implicit return type is class itself.
'this':  keyword is a reference to the object on which the method is invoked.
Constructor can call another constructor. Ex;
public class name {
     val1 = 9;
     this(val1);
}

get methods (getters are called as accessors. set method (setters) are called as mutators. Its better to safeguard the member variables using the accessors and mutators.

3.c     Definitions:
 -  OverLoading:
Polymorphism concept. Class can have overloaded class or methods. Overload Methods will have same name, different argument list or different arguments.

 -  OverRiding:
ability to define a behavior that's specific to the subclass type, which means a subclass can implement a parent class method based on its requirement.

Ex: Dog extends Animal
Animal a = new Animal();  a.move(); // calls Animal Class
Animal b = new Dog();   b.move();   // calls Dog Class

 -  Garbage collector: In oops, dynamically allocated objects must be manually released by use of delete operator. But in java, it is taken care from garbage collection.

 -  Finalize:  if an object is holding any non-java resources such as file handle or window character font, it's better to free the resources before the object is destroyed. To handle this we need a finalize() method where we will specify the actions that must be performed before the object is destroyed. The access specifier 'protected' prevents access to finalize by code defined outside it's class. Finalize is called just prior to garbage collection. It's not called when an object goes out-of-scope.

 -  Constructor: we can overload constructor, but we cannot inherit. We can also pass objects as parameter in method​.

 -  Argument passing to a method can be 'call by value' or 'call by reference'

 -  Recursive: The method which calls itself with base condition is called recursive method.

 -  Object Class: It is the root of all the class.
Ex: Object obj1 = new anyClass();
It has few holdings of methods like getClass(), hashCode(), equals(), clone(), toString(),
notify(), notifyAll(), wait(), wait(long timeout), wait(long timeout, int nanoseconds),
finalize()
.equals will check the exact object reference. This can also be overrided within derived class.


 -  java instanceof operator is used to test whether the object is an instance of the specified type (class or subclass or interface).

 -  Super Classsuper is the reference to the current object, It helps to access the overrided members from the immediate base class. The member variables can be accessed inside the function.

 -  Final: It treated as constant, can be applied on class and the members. Final prevents the 
overriding and inheritance. If class is final, all methods will be final.

 -  Abstract keyword makes the compulsion of inheriting the member to the derived class. Abstract requires the overriding and inheritance. If member is abstract, then the class is also made abstract.

Ex: if(o instanceOf Flight)

 -  Constructor inheritance:
Inheritance can be used by 'extend' keyword.
Constructors are not inherited. To call the base class constructor, call the super/this.
ex: super(param1) -> it will call the base class constructor. But this should be the first line in the method.

 -  Variable Arguments:
If the user is unaware of the paramaetrs list, Along with Overloading, variable number of arguments can be passed to the functions parameter list. (...) has to be given as the last parameter in the function.

 -  Final Fields:
There are two different ways to assign the fileds as final. 
-> Final : a Member variable can be set as final. It will be considered as constants. And can be assigned once in the constructor and not modified later.
-> Static Final : Static Final is assigned to a variable, when there is a need to define the constants across all the instance of the class.
Ex: static final int MAX_SEATS = 100; 

 -  Interface:
Like class, Interface can have methods and variables. But the methods declared are abstract, by default. But, abstract class can have non-final members. Interfaces specify what a class must do and not how. It is like the blueprint of the class. All the methods in interface are declared with empty body and are public and all fields are public, static and final by default. Since java does not support multiple inheritance in case of class, but by using interface it can achieve multiple inheritance . It is a loose coupling. The implementing class should define the body as public method.
Implements is the key word for using interface.

 -  Static Members: 
The particular member belongs to a type itself, rather than to an instance of that type. This means that only one instance of that static member is created which is shared across all instances of the class

 -  Static Initialization Block: 
This is the block which runs before the main block and it is executed only once. This block will not return anything. Checked exceptions cannot be thrown. We cannot use the "this" keyword since it does not have any instance. use the keyword static. NESTED Class, INNER Class, ANONYMOUS Class -> theses are the extra information may be used for structuring, scoping etc.


3.d     Error Handling With Exceptions:
It is better to handle the exceptions by our self, for better tracking. Rather than the run job takes care of it.
try block contains the code to be executed.
catch block contains the code to be handled, when the error occurs.
Finally block contains clean-up code and runs in all cases following the try or catch block.

(Exception e) is the parent of all the exception class.

Exceptions are class. Every Exception type follow the hierarchy. We can also define our own class of exception with throwable interface. Each exception type can have a separate catch block. First assignable catch is selected. The throws clause of an overriding method must be compatible with the throws clause of an overridden method

Exceptions & Methods:
In the nested method call, if the last call of the method throws an error, it can be caught in the first method. If there is no catch block written in the relevant methods. So, the exception propogate the call stack. The implementing exception method should extend Exception class.

Note: Always the first exception is caught in the list and further upcoming will be suppressed.In order to get all the exceptions caught, we have to use e.getSuppressed in the for loop

*****************************************************************************

4. PACKAGES & STREAMS

4.a     Introduction      
Packages are created to make an organized structure in project. Name should be in lowercase and it should be unique. Packages are usually created under 'src' folder. After the creation, Run application from eclipse will give the result. Or, from the command line, go to directory "workspace\First\bin\com\visteon\Organized"
then call, java com.visteon.Organized.Organized.
Here 'organized' is the name of the class and the packages.

      A package is a group of related types. 
-> It creates a namespace.
-> Provide an access boundary.
-> Act as a unit of distribution.
 Types in current package do not need to be qualified. Also, types in the java.lang package do not need to be qualified. Object, primititve, wrapper class, String, StringBuilder etc neednot be qualified.

Type 'import' allows us to use the other package in the class. 
There are two types of import available:
* Single type import:
com.name.package.ClassName -> this will specify the exact class, which we wanted to use.
It is specific and clear.

* Import On Demand:
com.name.package.* -> This will allow all the class available in the package.
The drawback is, if there is same classname available in more than one package. Then, the conflict arrives.

Packages provide a unit of Distribution. package folder structure can be placed into an archive file. It contains a manifest which tells the content of the archive file and the entry point of it. Along with IDE's, some of the build automation systems (build managers) such as GRADLE, MAVEN, will support the JAR files.
Each IDE's will create it in a different way. We can run in commandline also.
Ex: "java -jar CalEngine.jar"
Jar files can also be renamed as .zip and extracted in the windows.

4.b STREAMS:  (Input stream, output stream, files)


Streams:
-  Stream is an ordered sequence of data. There are 2 categories of data. Byte stream & Text streamByte Stream class: Inputstream and outputStreamText stream: Reader and writer.-  There are two variants of read. On read for reading the whole data. Another for reading to a array.-  Common Stream classes: Char array, file, piped, input/output stream, string


4.b.1  Stream Errors & Cleanup;Autcloseable interface takes responsibility of calling close. It is also possible to handle the errors using try catch exceptions.

Try-with-resource: this method allows us to initialize the resource or a class to be declared in try block.try(Reader reading = Helper.openReader("file1.txt");){}Similarly we can initialze more than one. Finally, the Autocloaseable interface is called.


Note: Always the first exception is caught in the list and further upcoming will be suppressed.In order to get all the exceptions caught, we have to use e.getSuppressed in the for loop


4.b.2  Chaining Streams:You can chain streams within streams. chaining means, declaring within the block. But, once the higher level stream closes, it closes the lower level stream also.


4.b.3  File & buffered Streams:Buffered streams are preferred for the File streams. It is efficient in terms of memory. We can also use the method newLine in buffered Reader, so that we can insert a new line in the file while writing. Similarly, we can use readLine method to read from the file easily.Accessing files with java.nio.file package:ReadLines and readAllLines helps the user in reading the contents from the file easily and fastly.


4.b.4  File Systems:Java supports creating the zip file systems. and operating with it. It allows us to copy into and write to a file inside the zip file system. We can operate the same way as the file systems.

4.b.5  String Formatting & Regular Expressions:-> 

String Joiner:This acts as a collection of strings. We can create a String Joiner with delimiter. we can add the common pattern and add it in the list of delimiter. use add method and then finally use toString method.
Ex: StringJoiner sj = new StringJoiner ("] , [", "[",  "]") for {[alpha], [beta], [gama]} string.

String.format method is a kind of replacement to the sprintf in c.
String.format("%d",10); will display 10. similarly for other format specifiers.
String.format("#%x",8); will display 0x8 ; means it will try to print in the original format. 
Other options are: 

-- 
include radix ( mention the base)
-- padding ( %4d will make 4character width printing. similarly %04d will print 0 instead of space)
-   -- Left justify (All the characters / digits will be alligned left),    
-- include groupingspace 
- to put the sign of the number( - put the parenthesis: Ex: "%(d"ARGUMENT INDEX:It is a flexibility to print the values in the order.
using string.format ("%3$d") etc.We can write the formatted content to the stream. 
Formatter class allows us to input the writer object. format is the method which allows to write the formatted content directly to the stream/file.REGULAR EXPRESSIONS:\w      --> Match 1 word character\w+    --> Match 1+ word character\b       --> match word breaksreplaceFirst(), replaceAll(), split(), match() method supports the regular expressions.in the method argument, we can combine the passing string along with the escape sequence to achieve it.Ex: String s2 = s1.replaceAll("ple\\b", "ricot"); -> replace all the words before a word break.Dedicated regular expression classes: Pattern class can compile the sequence-> matcher method will find the value -> find and group method will help the print the words.

*****************************************************************************

5. COLLECTIONS

5.a  Collections Introduction:
A Collection is a group of individual objects represented as a single unit. Java provides Collection Framework which defines several classes and interfaces to represent a group of objects as a single unit. They have a list of pre-defined set of method which supports each data type like add, get, addAll etc.

Java collection framework ships with the JDK to the Programmer. Reason is,
- almost everything in the application uses the collection.
- implementing the data structures may be hard.
- data structures with ordering, uniqueness, pairs has to be implemented. 

Types of collection:
List {ArrayList, LinkedList}, Set{Hash set}, Sorted Set{Tree set}, Queue{Priority Queue}, Dequeue(double ended){LinkedList, ArrayDequeue}, Map{Hash map}, sorted map{Tree map}.

-> Collection with Iteration order: (List)
          Lists are collection with iteration order.    
         Sets are collection of distinct elements. There are no duplicates.          
-> Collection with Pairs: (Maps)       


Map Collection / Dictionary: 
Maps are the list of unique keys and duplicated/unique value mapped to a key.
HashMap: General map
TreeMap:  Sorted Map with sorted keys. and can be balanced from comparator or comparable interfaces.
Common Map methods:
put, putIfAbent, get, getOrDefault, values, keySet, forEach, replaceAll.
SortedMapMethods: firstKey, lastKey, headMap, tailMap, subMap.

5.b  Common collection interfaces & Arrays: 
































Common collection methods:
size, clear, isEmpty, addd, addAll, contains, containsAll, remove, removeAll, retainAll.
New Collection methods in Java8: lambda expressions, forEach, removeif
Converting between collections & Arrays: toArray() helps to convert the collections to array. And asList(), toList() will convert collections to array/list. 




Below picture explains, how the decision has to be made for picking the collection:

Collections are classified into below order:
-> Collection with uniqueness: (Sets)
-> Collection with modification order: (Queue)

 -  Sorting: comparable and comparator re the interfaces supported.
User has the eligibility to extend the CompareTo(), equals() method of the interface.


 -  Command Line Arguments: Will help to pass the information to the program. It is a array of Strings.


 -  CLASS LOADING: -cp , -jar are the options available to load paths and jar files.

Properties in Class: We can load the properties and store it in a file. Ex: usersettings / projectSettings file. Similarly we can store in a xml file. 


Similarly, java provides option to load and feed the variable information like environmental variable, java application variable, system variable.


*****************************************************************************


LOGGING APPLICATION:

Logger is a class which provides user to log the messages. Different set of log levels have been defined. It is the standard method of using in the javaapplication. There are 7 special log levels with 2 special logger levels. 


*****************************************************************************


MULTI-THREADING & CONCURRENCY:

 Threads can be executed as single threaded and multi threaded. It helps the resource management, the way it access the memory, the way it does the context switching and the concurrency. Run method is the first to run when the thread starts execution. Runnable interface represents a task to run on a thread. It simply overrides the run method and handles the exception responsibility.
Topics: ExecutorService, Callable interface, Future interface, 
-> All java objects have a lock. Use the synchronized method to acquire the lock. 
                                                                                               
****************************************************************************

MISCELLANEOUS

-> Optional Compiler options
Use -Xmx to specify the maximum heap size
Use -Xms to specify the initial Java heap size
Use -Xss to set the Java thread stack size


****************************************************************************
EXERCISE:
Implement the below problem which has all the topics covered.

BANKER Sample Application:

General Rules:
1) Follow the coding guidelines according to java standard
2) comment wherever necessary
3) create a problem statement with clean specification
4) make a release note
5) setup / try the debug setup
6) list all the mechanism "yet to used" and "used"

BANK Problem statement: (Please extend according to the need)

USERS:
-> Bank application will have 3 types of user.
Admin
AccountHolder
Loanee

JOBS / RESPONSIBILITY:
ADMIN:
- can add / delete the accountHolder
- can add /delete the loanee
- interest rate allocation for FD
- interest rate allocation for Loanee

AccountHolder:
- Credit the money
- withdraw the money
- Create FD's
- Request loan
- Request for closure of the account

Loanee:
- Request loan amount
- Topup
- Repay the amount the amount
- request closure of the account

Yet to use:
Class, new, constructor, destructor, copy constuctor, delete, overloading, overriding, finalize, recursive, instanceOf, super, final,
abstract, interface, variable arg, static member, static function, friend function, exception, packages, buffered stream, file stream,
collectios: ArrayList, LinkedList, Hash set, tree set, queue, dqueue, hash map, sorted map, sorting, comparable, compareTo,
commandLineArguments, collection methods: {size, clear, isEmpty, addd, addAll, contains, containsAll, remove, removeAll, retainAll},


Used:

****************************************************************************