Posts

Showing posts from March, 2017

Let's Say Hello To JAVA RMI

Image
What is RMI? Java  Remote Method Invocation  (RMI) is a mechanism which allows a java program to invoke methods on an object running in another JVM. The RMI is used to create distributed applications in Java. That means remote communication between applications can be done using Java RMI. Let's keep RMI aside for a while and consider the following java classes. class  MyCal{    int  n ,  m ;     public int  add( int  x, int  y){        return  x+y;    }     public int  sub( int  x, int  y){        return  x-y;    } } class  Main{     public static void   main(String[] args){        MyCal obj =   new   MyCal();  //line 1        int  ans = obj.add(4,8);  //line 2    } } When the line 1 of Main...

JAVA New Features

Image
New Features in JAVA 8 Java 8 release is the greatest thing in the Java world since Java 5 (released quite a while ago, back in 2004). It brings tons of new features to the Java as a language, its compiler, libraries, tools and the JVM (Java virtual machine) itself. There are dozens of features added to Java 8, the most significant ones are mentioned below  ðŸ”» . 📌Lambda Expressions Functional Programming    Lambda expressions provide anonymous function types to Java     –  Replace use of anonymous inner classes     –  Provide more functional style of programming in Java doSomething(new DoStuff(){     public boolean isGood(int value){        return value == 42;     } }); doSomething(answer -> answer == 42); 📌Extension Methods Bringing Multiple Inheritance (of Functionality) to Java    Provide a mechanism to add new metho...