Sarmistha Panda

59 Flips | 2 Magazines | 34 Likes | @SarmisthaPa2016 | Architect

4 ways to sort a List using Stream or Lambda Expression in Java 8

This articles discusses various approaches to sort a List in Java 8 using Streams and Lambda Expressions.<p>Sorting using Stream sorted() method<br>• Sorting …

Programming

Java StAX API

This articles discusses about Java Streaming API for XML (StAX) and its variations, Streaming and Cursor api.<p>StAX api<p>Streaming API for XML (StAX) is …

Microservices

Cloneable interface and clone() method in Java

Cloneable Interface<p>Cloneable is a marker interface. It does not define any members.<p>This interface indicates that a class implementing it allows …

JavaScript

Factory Pattern in Java

Factory pattern lets a class defer instantiation to subclasses. <br>Factory pattern is useful when we have several concrete classes being instantiated …

Apple Pay

Java 8 IntStream operations with examples

IntStream is a specialized Stream for manipulating int values.<p>In this article, we will see some examples of IntStream operations.<p>Creating an IntStream<p>…

Extreme Sports

Recursion Programs in Java

Recursion is a process of a method calling itself.<p>Recursion can be used to solve problems where a logic needs to executed repeatedly for a smaller …

Convert Decimal to Binary using Recursion Java

In this article, we will write a program to convert a decimal value to binary in Java.<p>Program :<p>1<p>2<p>3<p>4<p>5<p>6<p>7<p>8<p>9<p>10<p>11<p>12<p>13<p>14<p>15<p>16<p>17<p>18<p>19<p>20<p>21<p>22<p>23<p>24<p>25<p>26<p>package …

Java

Java 8 Interview Questions - Part 2

In this article, we will discuss frequently asked Java 8 Interview Questions and Answers.<p>You can refer the Part 1 using this link : Java8 Interview …

Convert Stream to Set using Stream collect(toSet())

Stream collect()<p>Stream collect() method collects elements from a stream and stores them in a collection.<p>We can supply a Collector to the collect …

Ubiquitous Computing

Convert Stream to List using Stream collect(toList())

Stream collect()<p>collect() is an eager method.<p>This method collects elements from a stream and stores them in a collection.<p>collect(toList()) collects …

Mathematics

Java 8 Stream flatMap

In this article, we will discuss Java 8 Stream flatMap.<p>Stream flatMap()<p>Stream flatMap is a combination of two operations .. a map operation and a …

Ubiquitous Computing

Java 8 Stream reduce() operation with examples

Stream reduce()<p>Stream reduce() operation can be used when we want to derive a single value from a collection of values.<p>sum(), min(), max(), count() …

Programming

Stream map() operation with examples

Stream map() method is useful to map or transform an input collection into a new output collection.<p>For example, mapping numeric values to the squares …

Java Enum with examples

What is enum in Java ?<p>An enum type is a type whose fields consist of a fixed set of constant values.<p>enum types were introduced in Java language in …

September 2016

We have compiled a list of the most viewed articles of September 2016. <br>Here they are for your quick reference..<p>Running JavaScript from Java using …

Java

jQuery Datepicker

jQuery Datepicker widget can be used to select a date from a calendar. <br>For implementing Datepicker, include jQuery UI library along with jQuery UI …

How to sort a map in Java 8

Prior to Java 8, a Map could be sorted as explained in this article : <br>How to sort a Map in Java<p>The below examples demonstrate how we can sort a map …

Programming

Running programs like MS Paint, Notepad from Java

In this article, we will see examples of running other programs like Notepad and MS Paint in Java.<p>Using Runtime exec() method<p>In this example, we will …

Java Arrays Class

Arrays Class in Java<p>Arrays Class has built in functions to achieve the frequently used array operations.<p>These include :<p>– asList() for creating a List …

Top 10 Java articles : January 2016

A big “Thank you” to all our contributors and readers.. TopJavaTutorial.com published 50+ articles in the last month. <br>We received some nice and …

Top 10

Top 10 Sorting algorithms in Java

Sorting algorithms:<p>A sorting algorithm is an algorithm that puts elements of a list in a certain order. <br>The most-used orders are numerical order and …

How to iterate over HashMap in Java

This articles discusses different approaches of iterating over a Map or HashMap in Java.<p>Iterate HashMap using For-Each loop and Map.Entry<p>This is a …

Programming

Java Coding Interview Questions - Part 6

You may also like :<p>Java Coding Interview Questions – Part 1<p>Java Coding Interview Questions – Part 2<p>Java Coding Interview Questions – Part 3<p>Java …

Java Quiz 9

What will be output of this simple java program ?<p>Click button below to answer the quiz :<p>Reference : Javapuzzlers<p>© 2015 – 2016, …

Java 8 Date Time api

In this article, we will discuss the new Date Time api introduced in JDK 8.<p>A new Joda Time api was introduced in JDK 8 with the package java.time<p>Here …

Finding an element in an Array in Java

We can use following approaches to find an element in an Array :<p>Finding element in array using Java Arrays.binarySearch()<br>• Finding element in array …

Java Varargs

This article explains the concept of variable arguments in java.<p>Variable arguments in java<p>In the method signature in java, we provide the type and …

August 2016

We have compiled a list of the most viewed articles of August 2016. <br>Here they are for your quick reference..<p>Java Coding Interview Questions – Part …

Java Coding Interview Questions - Part 3

This is part-3 of the coding interview questions. You may refer the complete list here :<p>Java Coding Interview Questions – Part 1<p>Java Coding Interview …

July 2016

We have compiled a list of the most viewed articles of July 2016. <br>Here they are for your quick reference..<p>Cloneable Interface and clone method in Java<p>…

Top 10