HTML

How to Convert Stream to ArrayList in Java 8 - Collectors.toCollection() Example

You can use Collectors.toList(), toSet(), and toMap() to get all elements of Stream into any Collection like List, Set or Map, but if you want to get a particular collection e.g. ArrayList, then you need to use Collectors.toCollection(ArrayList::new) method. This method first creates an ArrayList using method reference and then adds all elements of Stream into the ArrayList. It's very useful if you have a long list of String and you want to create a smaller list containing only String starting with the letter "b"  like "Bluehost"

Top 10 Free Java Courses for Beginners and Experienced Programmers - Best of Lot

Hello guys, the Internet is full of useful resources, and no matter what you want to learn, there is something useful available for free. You just need to commit your time and effort. But at the same time, it's challenging to choose from the massive sea of free tutorials and courses on the internet. If you are not careful, you will spend most of your time browsing and changing classes without learning anything. That's where a curated list helps. Curation is my hobby and passion. I love to read books and courses which allows me to curate useful resources and share them with you guys.

Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number - Solution

Hello guys, if you are getting below error in your Java program and wondering how to solve this or just stuck then you have come to the right place. In this article, I will explain to you what causes the " java.sql.SQLSyntaxErrorException: ORA-01722: invalid number" error when you connect to an Oracle database from a Java program and how you can solve it. 

But, first of all, let's take a look at the stack trace of this error which looks like below:
Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)

Top 10 Java 9 and Module Tutorials and Courses - Best of Lot Must Read

It's been more than a couple of years or so since JDK 9 was launched, and the new year is probably the best time to learn Java 9 and get yourself familiar with new features and enhancements on existing APIs. The highlight of the JDK 9 release was Project Jigsaw or Module system. The Java 9 Platform Module System allows Java to move forward by modularizing the JDK as well as adding modules as first-class citizens to Java, but that's not the only thing to look forward to, there are many small changes that are very useful in day-to-day coding.

Java 8 Optional isPresent(), OrElse() and get() Examples

The Optional class in Java is one of many goodies we have got from the Java 8 release. If you use it correctly, Optional can result in clean code and can also help you to avoid NullPointerException which has bothered Java developers from its inception. Even though many of us have used null to indicate the absence of something, the big problem is that if you call a method or access a field on the null object (except static fields), you will get a NullPointerException and your whole program may crash. 

Top 5 Free Big Data Courses for Java Programmers to Learn Hadoop, Spark in 2021 - Best of Lot

Hello Java Programmers, If you want to learn Big Data technologies in 2021 like Hadoop, Apache Spark, and Apache Kafka and you are looking for some free resources like books, courses, and tutorials, then you have come to the right place. In this article, I am going to share some of the best free online courses to learn Hadoop and Spark from Udemy and Pluralsight at your own pace. I personally like to start with FREE resources before I have enough knowledge to choose the right book or enroll in a little expensive course. It's also my passion to surf the web to find great free resources and share them with you guys.