Java 8: How to?

 

Java8

 

Hi there!

If you are already familiar with Java and if you do not have much time to spare on reading, the stuff I write about in my blog might interest you.You are more than welcome to point out any mistakes that I have made in my posts, because after all I am a newbie myself. I have started to read up on Java 8, therefore I will be posting as and when I learn something new. It could be on the new features in Java 8 or those few features in Java 7 that haven’t really received much attention.  The topics I have covered so far are;

JAVA 8:

Getting Started with WSO2 Caramel Framework

During my internship at WSO2, I came across WSO2’s Jaggery framework. This open-source framework enables Developers to write all aspects of their web application; the front-end UI, the back-end logic and even the communication and persistence mechanisms, purely based on Javascript. As you might already know, a modern web programme uses Javascript up to a considerable extent at the front-end. Also, you can use Javascript to work out your magic at the server side as well! So, without getting bogged down on learning various technologies to implement the server-side logic of your web application, if you know HTML, CSS and Javascript, you can simply start writing a web application with the help of Jaggery. Continue reading

Exception Handling in Functional Interfaces

In a previous post I have described what a functional interface is.  In the same post I explained that lambda-expressions can be used at any place a functional interface is used and gave an example for doing so.

One issue with using functional interfaces introduced under Java 8 is that functional interfaces don’t allow checked exceptions. In this post will discuss a way that will be able to fix this problem sometimes. Continue reading

Java 8 Streams in a Nutshell

If you have done programming with java, I’m sure by now you must have realized the importance of the java collections framework (JCF). A collection is a data structure which contains and processes a set of data. Examples of collections data structures are lists,  sets, queues etc. The Wiki definition identifies the collections framework as a set of classes and interfaces that implement these commonly reusable collections. Continue reading

Essence of Variable Scope in Java 8

In Java, a class can contain several types of members; variables, methods or even other classes. Having other classes as members inside a particular class is often referred to as “nesting classes”. Here, the class written within is called the nested class, and the class that holds the nested class is called the outer class. Java SE 8 brings about some changes to the variable scope related to nesting of classes. Continue reading