Home > Java Core (page 2)

Java Core

JAVA 7 way v/s JAVA 8 way- Let’s get our hands dirty with Lambdas- Functional Programming in JAVA 8- Part 4

Java

Before reading this post kindly go from part 1 of this post to understand lambda expression. https://jkoder.com/understanding-java-8-lambda-expression-functional-programming-in-java-8-part-1/ Here we will see practical difference between JAVA 7 and JAVA 8. We will create a list of Person objects and we will do below 3 things on it first by using JAVA 7 way then by JAVA 8 way. Sort list by ... Read More »

Sample usage of Lambda Expression with Runnable interface- Functional Programming in JAVA 8- Part 3

Java

Sample usage of Lambda Expression with Runnable interface- Functional Programming in JAVA 8- Part 3 Before reading this post kindly visit from part 1 of this post to understand lambda expression. https://jkoder.com/understanding-java-8-lambda-expression-functional-programming-in-java-8-part-1/ There is no Function Type in JAVA for lambda expression types, JAVA designers reused the concept of Interface Type that is already available in JAVA. There may be ... Read More »

JAVA 8 Lambda Expression as Interface Type- Functional Programming in JAVA 8- Part 2

Java

JAVA 8 Lambda Expression as Interface Type- Functional Programming in JAVA 8- Part 2 Before reading this post kindly go through part 1 of this post to understand lambda expression. https://jkoder.com/understanding-java-8-lambda-expression-functional-programming-in-java-8-part-1/ It’s time to uncover the type of lambda expression and the execution of lambda expression. Here’s the code that we have been looking in the part-1 post. Output:- Hello ... Read More »

Understanding JAVA 8 Lambda Expression- Functional Programming in JAVA 8- Part 1

Java

Understanding JAVA 8 Lambdas- Functional Programming in JAVA 8- Part 1 Why Lambdas?….Lambdas is a new programming construct which lets you build JAVA applications in a completely different paradigm. So, what are the advantages that lambdas bring to the table:- Lambdas enables Functional programming in JAVA, it’s actually a paradigm shift from conventional Object Oriented programming. Readable and concise code ... Read More »

Generate Windows EXE installer setup/EXE executable file from executable JAR file using javapackager of JAVA8 JDK

Java

Generate Windows EXE installer setup/EXE executable file from executable JAR file using javapackager of JAVA8 JDK For all those who are dealing with executable JARs of technologies like SWING or any other standalone applications. Yup distributing files like these are very hefty jobs. Well if you are planning to distribute an installer file or executable file(Both EXE) for WINDOWS machine ... Read More »

Android Toast like message dialog in Java Swing

Java

Android Toast like message dialog in Java Swing If you are using SwingWorker background thread for doing long operations and if you want user to see some useful information then ofcourse you need to use process() function as it is invoked by Event Dispatcher Thread. But if you using JOptionPane.showMessageDialog(null, “message”); you can invoke message dialog from background worker thread. ... Read More »

Java Mail API- Reading OUTLOOK mails

Java

Java Mail API- Reading OUTLOOK mails Using JAVA Mail API for reading mails has been common these days. It’s pretty easy to use. Over the internet you can get boilerplate codes for reading mails from GMAIL or YAHOO, however I find a bit tricky when it comes to reading mails from OUTLOOK. GMAIL and YAHOO provides settings feature where you ... Read More »

Maven- Creating a Jar together with its dependency Jars into a single executable Jar file

Apache Maven

Maven- Creating a Jar together with its dependency Jars into a single executable Jar file Suppose your boss comes and ask you to create a standalone JAVA application. Assuming you being a MAVEN lover, you created a JAVA application using MAVEN dependency management tool. Now suppose you have some MAVEN dependencies that are needed by your JAVA application. Since, it’s ... Read More »