HTML

How to parse String to LocalDate in Java 8 - DateTimeFormatter Example

From Java 8 onward, you are no longer dependent on the buggy and bulky SimpleDateFormat class to parse and format date Strings into real Date object in Java e.g. java.util.Date. You can use the DateTimeFormatter class from java.time package for all your formatting and parsing need. You are also no longer required to use another buggy class java.util.Date if you are doing fresh development, but if you have to support legacy code then you can also easily convert LocalDate and LocalTime to java.util.Date or java.sql.Date. In this tutorial, we will learn about both parsing String to date in Java and formatting Date into String.

10 Free Java 8 Certification Sample Questions - OCAJP8 and OCPJP8 - 1Z0-808 and 1Z09 dumps

If you are preparing for Oracle Java SE 8 Certifications e.g. OCAJP8 and OCJP8, also known as exam 1Z0-808 and 1Z0-809 and looking for some free practice tests then you have come to the right place. In this article, I am going to share some of the best OCAJP 8 and OCPJP 8 mock tests available for free of cost online, so that you can check your speed and accuracy before the real exam. These tests are not just useful for Oracle's Java OCA and OCP certification but also for upgrade exams like OCJP 8 upgrade exams with code 1Z0-810 and 1Z0-813, upgrade to Java SE 8 from Java 6 and prior version. Many of these practice tests are like web simulator where you need to solve a relatively small number of questions within 45 to 60 minutes. The web simulator also includes timer so that you can finish these free mock tests on time.

How to convert Integer to String in Java - Example

This is the second part of String to Integer data type conversion tutorial in Java, in the first part you have learned how to convert String to Integer and in this article, you will learn the opposite i.e. convert from Integer to String. Actually, you can apply all the tricks, which I had told you before about converting long to String, and autoboxing will take care of converting int to Integer in Java. But, if you care for performance and believe in not using auto-boxing when not needed then there are still a couple of ways which directly converts an Integer object to String e.g. Integer.toString() method, which returns a String object and doesn't have any auto-boxing overhead. Let's see a couple of more ways to convert an Integer to String in Java.

10 Books Java Developers Should Read in 2019 - Best Of Lot

Hello guys, If you are Java developer and wondering what to read in 2019 then you have come to the right place. In this article, I am going to share 10 books on Java, Spring, and related technology a Java developer can read. I have included books for both experienced Java developer who is more inclined to learn about architecture stuff,  developing for Cloud, MicroService, Java 9, and Spring 5 features and thinking of learning Kotlin to improve their productivity, but I have not forgotten to junior and less experienced Java developers or some who are thinking to start their journey into Java world in 2019.

5 Things You can Gift to Programmers,Software Developers and Tech Geeks

So, its that time of the year again when you start thinking about gifts for your programmer boyfriend, husband, colleagues or your near dear ones. Even if selecting gifts were not tough, if your friend happened to be a programmer, it becomes slightly tougher. You might have heard that Programmers are aloof, nerd and tech freaks, well, you heard it right. Programmers  prefers to be alone in their own world but they also like gifts and you got it right, they are a nerd so they like books, gadgets, music and something which help them to learn something e.g. a PluralSight membership.

In 2017, gadgets like Apple Watch and Samsung Gear is rocking but that's what everyone is buying so if you want to be a little bit different, chose the one from this list.

5 Free Linux Courses for Programmers and IT Professionals to Learn Online

Linux is one of the most popular operating systems to run server-side applications. I have seen almost all Java applications running on Linux barring a couple of them which runs on Windows as service. If you take out standalone apps like IDEs or tools, most of the real world Java applications run on Linux e.g. payment gateways, trading systems, and other financial applications. That's why it's very important for any programmer, IT professional, or a developer to learn and understand Linux, both operating system, as well as command line.

3 Books to learn Java Programming from Scratch in 2019 - Best of Lot Must Read

I receive half a dozen emails every day asking about which is the best to learn Java from scratch? Which book should I read in 2019 to learn Java? or Which is the best Java for beginners? When I receive such email, before giving my recommendation I ask two questions, first do you have any programming experience? e.g. Are you coming from C, C++ or Python background? Or you are a fresher with no experience in programming, just a couple of classes on data structure and algorithm and operating system on college. If the guy some prior experience I recommend him the book like Core Java for the Impatient which teaches basics of Java programming language and API and also how to use Java in right way.

Top 5 Amazing Gifts for Programmers, Coders, and Software Developers

If you are planning for a surprise gift to your programmer boyfriend and husband on this holiday season e.g. Black Friday, on Christmas, or New Year or maybe on his next birthday, but not sure what to gift, then you have come to the right place. In this article, I am going to share some of the best gifts every programmer wish for. To be honest with you, buying a gift is easy but finding the right gift is very tough. I have spent countless hours on the internet to find a perfect gift for one of my colleague's husband and this article is a result of that research. The general perception of programmers is that they are a nerd, they love books, gadgets, cool stuff, music, but the perfect gift is something which not only provides the enjoyment but also the value.

Java 8 compute() and computeIfPresent() Example

The JDK 8 has added several useful methods in existing interfaces e.g. java.util.Map, java.util.Collection, and java.util.concurrent.ConcurrentMap. Thanks to default methods, the much-needed evolution of existing interfaces become possible. Out of many useful methods, one method which stands out to me is the compute() method, which allows you to update a value in ConcurrentHashMap atomically. As per Java documentation, The compute() function tries to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). The entire function is performed atomically.

10 ways to learn a New Technology, Programming language, Frameworks, or Libraries in 2019

One of the main challenges of being a programmer or software engineer is the constant learning. Yes, that's true. As a programmer or developer, we always need to learn new things, sometimes every year. Thanks to C, Java, Linux, and SQL, we still have some ground but the way these technologies are used changes every year. For example, we have a new JDK 9 release in 2017, even though many Java developers are still learning Java 8. We also have a Spring Framework 5.0 release in 2017, combined with Spring Security 5.0 and Spring Boot 2.0 release, which many of us need to learn in 2018.

10 Examples of Collectors and Stream in Java 8

As the name suggests, Collectors class is used to collect elements of a Stream into Collection. It acts as a bridge between Stream and Collection and you can use it to convert a Stream into different types of Collections e.g. List, Set, Map. Btw, it not just limited to that, it even provides functionalities to join String, group by, partition by and several other reduction operators to return a meaningful result. It's often used along with collect() method of Stream class which accepts a Collectors. In this article, we'll learn Collectors by following some hands-on examples.

How to Send HTTP Request from Java Program - Example Tutorial

If you are thinking is it possible to send an HTTP request from a Java program and if yes, how to send a simple HTTP GET request in Java, then you have come to the right place. In this article, I'll show you how you can use the HttpURLConnection class from java.net package to send a simple HTTP request in Java. But, first let me answer your first question, is it possible to send HTTP request in Java? Yes, it's possible and you can send any kind of HTTP request e.g. GET, POST, PUT, DELETE, HEAD, or PATCH. The java.net package provides a class called HttpURLConnection, which can be used to send any kind of HTTP or HTTPS request from Java program.

How to Set Specific Java Version for Maven in Windows?

Maven is a great build tool and most of the Java developer uses Maven to build their projects, but like any other tool, there are some intricacies which you need to know while using it. One of them is that Maven uses Java version from the JAVA_HOME environment variable and not the PATH environment variable. If you have multiple JDK installed on your machine and getting an Unsupported major.minor version 51.0 or Unsupported major.minor version 52.0 error while building your project but have right Java version in PATH then you may need to check the JAVA_HOME and update it. If you don't have access to do it then you can still change JAVA_HOME using set command in your local shell and run the Maven's mvn command to build the project