Java 8 testing and added in java main

Search function beginning in java 8