Monday, May 21, 2018

3 Ways to convert String to Boolean in Java? Examples

You can convert a String object to Boolean object or boolean primitive by using the Boolean.valueOf() and Boolean.parseBoolean() method. The steps are similar rot converting to String to other data types e.g. String to Integer and String to Long. You can use valueOf() method to convert String to Boolean object and parseBoolean() method to convert given String to boolean primitive value. Internally, valueOf() also uses parseBoolean() for parsing String but on top of that it also provides caching e.g. it can return Boolean.TRUE and Boolean.FALSE cached value for "true" and "false" string.  In fact, the Boolean.TRUE is returned only when String is equal to true ignoring case e.g. "True", "true", "TRUE" will evaluate into boolean true, hence Boolean.TRUE will be returned. For string like "Yes", Boolean.FALSE will be returned. We'll discuss the rules of String to boolean conversion in next section.

Saturday, May 19, 2018

Java 8 filter + map + collect + Stream Example

Hello guys, many of my readers emailed me to write a post about map and filter function of Java 8 because they found it difficult to understand and use. Even though I have previously blogged about both map() and filter(), I am writing this post again to explain the concept in more layman's language for better understanding of my readers and fellow Java developers.

The map() function is a method in Stream class which represent a functional programming concept. In simple words, the map() is used to transform one object into other by applying a function.

Thursday, May 17, 2018

Top 5 SQL and Database Courses to Learn Online - Best of Lot

Hello guys, if you are a computer science graduate or new into programming world, interested in learning SQL and looking for some awesome resources e.g. books, courses, and tutorials to start with then you have come to the right place. In past, I have shared some of the best SQL books and tutorials and today I am going to share some of the best SQL and database courses to learn and master this useful technology. If you don't know what is SQL and why should you learn it, let me give you a brief overview of SQL for everyone's benefit. SQL is a programming language to work with a database. You can use SQL to create database objects e.g. tables, stored procedure etc and also to store and retrieve data from the database.

Wednesday, May 16, 2018

10 Reasons to Learn Python Programming in 2018

If you are a regular reader of this blog then you may be wondering that why am I writing a blog post to tell people to learn Python in a Java blog? Didn't I ask you to prefer Java over Python a couple of years ago? Well, things have changed a lot since then. In 2016, Python replaced Java as the most popular language in colleges and University and since then it has never looked back. Python is growing and growing big time. If you read programming and technology news or blog post then you might have noticed the rise of Python as many popular developer communities including StackOverflow and CodeAcademy has mentioned the rise of Python as a major programming language.

Sunday, May 13, 2018

Top 5 MySQL Courses to learn Online - Best Of Lost

Hello guys, if you are interested in learning SQL with MySQL database and looking for some awesome resources e.g. books, tutorials and online courses then you have come to the right place. In past, I have shared some useful books and tutorials and in this article, I am going to talk about some of the best MySQL online courses from Udemy and Pluarlsight which you can join to learn SQL and MySQL from the comfort of your office or home. In last a couple of years, you might have heard the statement that everybody should learn to code, which is great. Coding is now like reading, writing and speaking skill and in today's Information technology-centric world it is must have and there is no better way to start coding than learning SQL, the most popular programming language.

Tuesday, May 8, 2018

10 Tips to Become a Better Java Developer in 2018

I often receive emails from my readers about how they can become a better Java developer, what things they should learn, and which area they can work on to become a Rockstar Java developer. After answering them individually over last few years, I thought to jot down a couple of points which I think will make you a better Java Programmer and Application developer. But, before going into that, I would like to stress that a better programmer is always a better Java developer and that's why all the tips I have shared before to improve your programming skill and become a better programmer still holds true.