Java Interface

Basics of Functional Interface And Lambda Expression in Java8

Reading Time: 3 minutes Java is based on OOPS concepts and abstraction is one of its feature. So by using interfaces in Java, we achieve abstraction. Like a class, an interface can have methods and variables, but the methods declared in an interface are by default abstract (method signature without body).

Back2Basics: The Story of Trait – Part 2

Reading Time: 3 minutes In our previous blog The Story of Trait – Part 1, we have discussed how traits are the just regular interfaces at the very basic form. In this blog, we will explore about traits can have method implementation too. We will continue with our previous example and modify it and see how trait behaves in different scenarios.

Back2Basics: The Story of Trait – Part 1

Reading Time: 3 minutes In this blog, we will have a look at traits in Scala. We have classes in Scala. Suppose we have a class Dog which has a method speak. class Dog(val name: String){ def speak() = println(s”$name is barking”) } Now if we want another class Cat which has the same method speak. What we will do? In Java, generally, we create an interface Animal and Continue Reading

Introduction to JNI- Java Native Interface

Reading Time: 2 minutes The Java Native Interface (JNI) is a native programming interface in JDK. It is used to call C/C++ libraries from the libraries written in Java and vice-versa. This is a java API which bridges the gap between C/C++ and Java. Why do we use Java Native Interface(JNI)? JNI calls are used when we already have a library which is written in C/C++ language and we Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!