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

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.

Top 20 Java Interview Questions with Answers for Programmers with 1 to 2 years Experience

If you are grad looking for an internship position in a company which uses Java, or a fresher, just out from college and looking out for Java development position, then this post is for you. I have attended, taken and participated in a different level of Java interviews, and I can say there is a huge difference between them, which is not surprising because you obviously want to ask different level questions based upon whether the candidate is fresher or experienced. Similarly, the question at phone interview, written test, and face to face interviews, keeping this in mind, and give you always have a limited amount of time before going for any interview, It's important to prepare right set of questions.

Top 5 Free JDBC Courses for Java Programmers - Best of Lot

If you are a Java programmer and looking for some free JDBC courses to start learning database access in Java then you have come to the right place. In this article, I am going to share some of the free online JDBC (Java Database Connectivity) courses from popular sites like Udemy and Pluarlsight to give you a head-start in your long journey of writing real-world Java application which interacts with the database. Since Data is the utmost important part of any Java application, it's imperative to have a good knowledge of how to interact with the database from Java application and JDBC is the first step in that direction.

Top 5 Free Angular Courses for Web Developers to Learn Online

Angular is one of the most popular JavaScript frameworks for creating web apps. It helps you in creating complex web applications in less time. It's maintained by Google so you can also rest assured that this powerhouse of a framework is built with speed and purpose and here for a long run.  Angular is also the most popular framework in the world for building single page applications.  The framework was first launched as Angular JS which allowed building a web application using Model View Controller concept and it was hugely popular but it was later re-written completely, which is now known as simply Angular or Angular 2. Even though many web developers use Angular and Angular JS interchangeably they are very different and don't share anything expect Angular in their Name.

5 Free PHP and MySQL Courses for Web Developers

If you want to build web applications in quick time then PHP and MySQL is a good choice. PHP and MySQL are incredibly powerful open source technologies that allow programmers and web developers to create functional websites and apps that go way beyond basic HTML. PHP is specially created to generate interactive and dynamic websites and also known as server-side scripting language while MySQL is one of the leading relational databases along with Oracle and Microsoft SQL server. While it may seem intimidating to create a website using PHP and MySQL, especially for someone who has no experience in coding, it's not that difficult. With the right guidance and resources e.g. books and courses you can put together a PHP MySQL website in a week or so.

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

It's been more than a couple of months 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 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, there are many small changes which are very useful in day-to-day coding. For me the static factory methods introduced in List, Set, and Map to create a immutable list, set and the map is the most interesting one. Along with several changes on Stream API and Optional class. Those are the ones, I will most likely to use as soon as we start with JDK 9.

JDBC - How to get Row and Column Count From ResultSet in Java

One of the common problem in JDBC is that there is no way to get the total number of records returned by an SQL query. When you execute a Statement, PreparedStatement, or CallableStatement using execute()or executeQuery() they return ResultSet and it doesn't have any method to return the total number of records it is holding. The only way to find the total number of records is keeping the count while you are iterating over ResultSet while fetching the result. This way, you can print the total number of rows returned the SQL query but only after you have processed all records and not before, which may not be the right way and incur significant performance cost if the query returns a large number of rows.

5 Free Docker Courses for Java and DevOps Engineers

If you are an application developer working in Java or C# or any other language and wants to become a DevOps engineer or someone who wants to learn Docker then you have come to the right place. In this article, I am going to share some of the free Docker courses you can use take online to learn Docker by yourself. These courses are great for both beginners and intermediate developers who have basic ideas about Docker. If you don't know what is a Docker and how it works then let me give you a brief introduction. Before starting just look at the Docker's logo which is a whale carrying containers, does that strike something? Well, if you add this image with the name Docker you might think about shipping companies, which carry containers from one part of the world to another.

10 Books for Coders of All levels - Must Read Best of Lot

Coding is one of the most important skills for programmers and if you want to survive as a programmer you must improve your coding skill. Gone are the days, when you can get a software development job without having you to write a single line of code and then somehow survives in the job by doing support, coordination, and other non-coding activities. Companies, both big and small are increasingly testing coding skills of candidates before hiring. It's very common for programmers to pass a coding test before a telephonic round of interview. Some of the companies even hire websites like HackerRank and others to check the coding skill of potential candidates, many others give candidates take home coding tests. In short, companies have a lot of focus on the coding skill of potential hires.

Top 50 Core Java Interview Questions with Answers

If you are preparing for your next Core Java interview and looking for some common question to practice or check your knowledge then you have come to the right place. In this article, I'll share 50 Core Java Interview Questions from various companies. I have already discussed the answers to these questions in this blog or Javarevisited, so I have just put the link. First, you should try to answer it yourself and if you cannot then go to the link and find the answer. You can also compare your answer with mine and learn a few things here and there. In most of my interview post, I have also shared some common techniques to drive interview towards your comfort zone and how to leave a long-lasting impression on the interviewer, you can use those techniques to do well on your Java interviews.

A Simple Example to Check if File is Empty in Java

One of the readers of my blog Javarevisited emailed me yesterday about how to check if a file is empty in Java and that's why I am writing this post to show that using an example. The common approach for checking if a file is empty or not is to first check if the file exists or not and then check if it contains any content, but Java has done that hard work for you. Well, it's pretty easy to check emptiness for a file in Java by using length() method of the class. This method returns zero if the file is empty, but the good thing is it also returns zero if the file doesn't exist. Which means you don't need to check if the file exists or not.

JDBC - Difference between PreparedStatement and Statement in Java

JDBC API provides three types of Statement for wrapping an SQL query and sending for execution to the database, they are aptly named as Statement, PreparedStatement, and CallableStatement. First one, Statement is used to execute normal SQL queries e.g. select count(*) from Courses. You can also use it to execute DDL, DML and DCL SQL statements. The second one, PreparedStatement is specialized to execute parameterized queries e.g. select * from Courses where courseId=?, you can execute this SQL multiple times by just changing the course parameters. They are compiled and cached at database end, hence quite fast for repeated execution. The third member of this family is CallableStatement, which is there to execute or call stored procedures stored in the database.

Mergesort in Java - Algorithm Example and Tutorial

The Merge sort algorithm is a divide and conquers algorithm. In the divide and conquer paradigm, a problem is broken into small problems where each small problem still retains all the properties of the larger problem -- except its size. To solve the original problem, each piece is solved individually; then the pieces are merged back together. For example, imagine you have to sort an array of 200 elements using the selection sort algorithm. Since selection sort takes O(n^2) time, it would take about 40,000-time units to sort the array. Now imagine splitting the array into ten equal pieces and sorting each piece individually still using selection sort. Now it would take 400-time units to sort each piece; for a grand total of 10*400 = 4000.

How to implement Radix Sort in Java - Algorithm Example

The radix sort, like counting sort and bucket sort, is an integer based algorithm (i.e. the values of the input array are assumed to be integers). Hence radix sort is among the fastest sorting algorithms around, in theory. It is also one of the few O(n) sorting algorithm along with a bucket and counting sort. The particular distinction for radix sort is that it creates a bucket for each cipher (i.e. digit); as such, similar to bucket sort, each bucket in radix sort must be a growable list that may admit different keys.

Java 8 Stream findFirst() and filter() Example

Suppose, you have a list of prime numbers and you need to find the first prime number which is greater than a given number? How do you find it? Don't tell that you will loop through the list and check each element and return the first element which is greater than the given number. Well, that's right but that's not what you should do in Java 8. That's good for Java 7 or earlier version but Java 8 offers you many better alternatives and one of them is Stream. You can use Stream along with filter() and findFirst() method to find out an element based upon a predicate.