Author Archive

Advance Streams Operations

Plethora of different operations available with streams. Some basic and very important operations are already been discussed in previous article (read it from here). Let’s see how collect, flatMap and reduce operations works. How to use Collect operation in streams? Collect is used to transform the elements of the stream into a different data structures

Streams in Java

Java stream API is available in java 8 and is completely different from InputStream and OutputStream of  java I/O. Streams are playing a vital role to bring functional programming to java. In this tutorial you will learn the most powerful operations offered by streams API such as reduce, collect, flatMap and parallel streams. Before starting

Functional Interfaces in Java

Java 8 introduced lambda expressions, which allowed us to write short and simple code using default interface methods, lambda expressions, method reference and repeatable annotations.  As we know java is a strongly typed language and it is mandatory to declare types but designers of lambda expressions omitted types when declaring the lambda expressions. To represents

Interfaces in Java

Interfaces in java are same like an abstract class, it does not attribute definition and all of its methods are abstract. An interface don’t have constructors and can’t be instantiated.  From Java 8 onward non abstract methods can be included in the interface by using default keyword. These methods are known as default or extension

Collections in Java

Arrays are used in java to store several objects. The issue with array is that it does not support dynamic allocation. It has a fixed length which is not changeable once it is declared. Moreover, array is a very simple linear structure and many applications require more flexible and complex structure such as linked list,

Map Interface in Java

Before proceeding with this article, If you are a new reader and you are not much familiar about collections. Read this article for more information ( Collections in java). Following are the key points to remember about Map and HashMap in java. Maps keys to values and can’t contain duplicate keys Each key map at

Enum Types in Java

Java provided Enum types are very powerful than other programming languages. Following are the main points one should remember about java enum types. enum type is defined using enum keyword enum type is a special data type that allows a variable that consist of a predefined constants enum declaration defines a class enum class body

Augmenting Parser – Adding Java Code

Consider previous example where we learnt how to generate a Lexical Analyser and Parser with JavaCC. Today we are going to discuss, how to augment BNF productions with Java code? Later it will be included in the generated methods. To do so we have to change Basic.jj specification file. To the BNF production Start we

Learn Java – Best Tutorials with Examples

Java Tutorial for Beginners – Learn Java in simple and easy steps starting from basic to advanced concepts with examples including Java Syntax Object Oriented Language, Methods, Overriding, Inheritance, Polymorphism, Interfaces, Packages, Collections, Networking, Multithreading, Generics, Multimedia, Serialization, GUI, RMI, JOGL, Graphics, 2D Graphics, and 3D Graphics. Learn Java with Coding Guru by visiting links

Reading and Writing data in text formats

There are two different ways to store data. Text and Binary Format. In this article we will cover only text format. We will discuss binary format in our next article. Text Format In text format, data is represented in human read able format Reader and Writer classes or their subclasses handle data in text form