Wednesday, June 11, 2025

3 Examples to Concatenate String in Java

String concatenation is the process of joining two or more small String to create a big String. For example, you can create a full name by concatenating first and last name of a person. Java provides multiple ways to concatenate String, but the easiest of them is by using + operator. It is one of the magical operators in Java, though Java doesn't support operator overloading, it has made an exception in the case of String and + operators.  Plus operator is a binary operator and primarily used to add two numbers if both operands are integer but it can also used to concatenate String if either both or first operand is String. For example, "Java" + "Programming" will produce "JavaProgramming".

3 Ways to Convert an Array to ArrayList in Java? Example

How to convert an Array to ArrayList in Java
Have you encountered any situation where you quickly wanted to convert your array to ArrayList or ArrayList to array in Java? I have faced many such situations that motivate me to write these quick Java tips about converting an array to ArrayList and ArrayList to array in Java. Both array and ArrayList are quite common and every Java developer is familiar with this. Former is used to store objects and primitive types while later can only hold objects. The array is part of standard Java fundamental data structure while ArrayList is part of the collection framework in Java.

How to Replace Line Breaks , New Lines From String in Java - Windows, Mac or Linux Example

We often need to replace line terminator characters, also known as line breaks e.g. new line \n and carriage return \r with different characters. One of the common case is to replace all line breaks with empty space in order to concatenate multiple lines into one long line of String. In order to replace line breaks, you must know line terminator or new line characters for that platform. For example, In Windows operating system e.g. Windows 7 and 8, lines are terminated by \n\r  also known as CR+LF, while in Unix environment e.g. Linux or Solaris line terminator is \n, known as line feed LF. You can also get line terminator pragmatically by using Java system property line.terminator.

How to Convert Byte Array to InputStream and OutputStream in Java? Example

Are you stuck with your coding because you have a byte array and the next method in the chain needs an InputStream? don't worry Java has a solution for that, You can use ByteArrayInputStream to convert byte array to InputStream in Java. This class takes a byte array as the source and since it's a subclass of InputStream, you can easily pass this to any method, which accepts InputStream as a parameter. Though most of the API like JDBC and File API allows you to read directly from InputStream because this allows you to process an arbitrary content with limited heap space. You should take advantage of this and directly read from InputStream instead of getting byte array and then converting them back to InputStream.

How to Convert InputStream to Byte Array in Java - 2 Examples

Sometimes we need to convert InputStream to byte array in Java, or you can say reading InputStream as a byte array, In order to pass output to a method that accepts byte array rather than InputStream. One popular example of this, I have seen is an older version of Apache commons-codec, while converting byte array to the hex string. Though, a later version of the same library does provide an overloaded method, to accept InputStream. Java File API provides excellent support to read files like image, text as InputStream in Java program, but as I said, sometimes you need String or byte array, instead of InputStream .

How to Reverse Array in Place in Java? Solution With Explanation

Reversing an array sounds pretty easy, isn't it? It does sound like that, because all you need to do is create an array of the same size, iterate through the original array from end to start, and populate your new array. Boom!!, you have got an array that has elements in reverse order of the original array, but the problem is you have used an additional array here, which makes space complexity of your solution O(n). You cannot use this solution if the array is big e.g. an array of 10 million orders and you don't have enough heap space available.

How to Convert List of Integers to Int Array in Java - Example

So, you have a List of Integers and you want to convert them into int array? Yes, you read it write, not on Integer array but int array. Though in most practical purpose, Integer array can be used in place of int[] because of autoboxing in Java, you still need an int[] if your method accepts it. In Java, you can not typecast an Integer array into an int array. Many Java programmer think about toArray() method from java.util.List to convert a List into Array, but unfortunately, toArray() is useless most of the time. It doesn't allow you to convert List into primitive arrays.

How to Generate MD5 Hash in Java - String Byte Array Digest Example

There are multiple ways to generate the MD5 hash in Java program. Not only Java API provides a convenient method for generating MD5 hash, you can also use popular open-source frameworks like Spring and Apache commons Codec to generate MD5 digest in Java. MD5 is a popular Message-Digest Algorithm, which is most commonly used to check data integrity e.g. comparing MD5 checksum to see, if any file is altered or not. Though MD5 has not considered a good cryptographic algorithm for security purposes due to several vulnerabilities found on it, it's still good enough or checking the integrity of the file. MD5 hashing algorithm generates a 128 bit or 16-byte long hash value.

Tuesday, June 10, 2025

Top 5 Courses to Learn JIRA for Beginners and Experienced in 2025 - Best of Lot

Hello guys, If you are working in Agile projects, you must have come across JIRA, one of the most popular tools for planning, project management, and bug tracking. Almost all software companies use JIRA for their software development, making it an essential tool for software developers, team lead, tech lead, scrum master, and project managers. If you want to learn JIRA and look for the best online training courses, you have come to the right place. In the past, I have shared free Agile courses and books, and  In this article, I will share the best courses to learn JIRA online for both beginners and experienced developers.

Is IBM Data Analyst Professional Certificate on Coursera worth it in 2025? [Review]

Hello guys, if you want to become a Data Analyst in 2025 and looking for the best online resources to learn Data Analysis essentials and kick start your career then you have come to the right place. Earlier, I have shared the best Data Analysis Courses for beginners and in this article, I am going to introduce you to one of the most popular Data Analyst certifications from Coursera, IBM's Data Analyst Professional Certification.  If you don't know Coursera brings the best learning material and resources from top companies like IBM and Google as the world's top universities like the University of Michigan and Stanford. Their Professional certifications are also well recognized and well structured to learn in-demand tech skills and this is one of them. 

Top 5 Courses to Learn Visual Studio Code IDE for Coding & Web Development in 2025 - Best of Lot

Hello guys, if you want to learn VS code and look for the best online courses and tutorials, you have come to the right place. In the past, I have shared the best Eclipse IDE courses and best courses to learn IntelliJ IDEA, and in this course, I will share the best online course to learn VS code, one of the most popular free code editors in 2025. If you are doing web development or programming, you might have heard about VS Code or Visual Studio Code, one of the best modern IDE from Microsoft for current developers. Visual Studio Code is a fast and lightweight cross-platform code editor for writing modern web and cloud applications. You can use VS Code not only on Windows but also on Mac. 

Top 10 Edureka Courses & Certifications for Java and Web Developers in 2025 - Best of Lot

Hello guys, if you are looking for the best Edureka courses to join in 2025, then you have come to the right place. Earlier, I shared the best Udemy courses and Pluralsight courses, and in this article, I will share the best Edureka certification courses to join in 2025. If you like online classroom training, you may hear about Edureka, the online live classroom training leader. Online classroom training is a bit different from online courses. You will get an opportunity to interact with instructors live; it's much closer to traditional classroom learning in school and colleges than online courses.  Because of this unique teacher-student interaction, online classroom teaching is becoming more popular every passing day. 

Monday, June 9, 2025

Top 10 Free AWS Courses on Udemy For Beginners in 2025 - Best of Lot

Since you're here reading this article, I am assuming that you all want to learn more about AWS. But before we get to the best 10 free courses that will teach you all about AWS, let me tell you what AWS really is, okay?  AWS, or Amazon Web Services, is the leading cloud provider in the industry right now. It gives developers more than 170 AWS services that they can access from anywhere in the world. AWS has customers in more than 190 countries all over the world. 

Top 10 Free Eclipse and IntelliJ IDEA Courses for Java Developers in 2025 - Best of Lot

Hello guys, if you are doing Java development and want to learn Eclipse or IntelliJ IDEA, two of the most popular Java IDE and looking for online resources then you have come to the right place. Earlier, I have shared best paid Eclipse courses and best paid IntelliJ IDEA courses but a lot of you asked for free courses so here we are today. In this article, I am going to share best free online courses to learn both Eclipse and IntelliJ IDEA for Java development. But, before we get to the 10 best free courses that will teach you everything you need to know about Eclipse and IntelliJ, let me tell you a little bit about what it all is. Both Eclipse and IntelliJ are basically IDEs or Integrated Development Environments. 

10 Free TypeScript Courses for Beginners in 2025

Hello guys, if you want to learn TypeScript, the language of web development and the one which i used in Angular framework and looking for online resources like online courses, books, and tutorials then you have come to the right place. Earlier, I have shared best TypeScript paid courses and books and in this article I am going to share best free online courses to learn TypeScript in 2025. But, before we get to a list of the best free courses that will teach you everything you need to know about TypeScript, let me tell you a little bit more about what it really is. For those of you who don't know, TypeScript is basically a strongly typed superscript of JavaScript. It can be compiled to plain JavaScript. TypeScript can be used for application-scale JavaScript development. It can also be executed on any browser, any host, and any operating system.