• 17 March

    New line character in java

    In this post, we will see about new line character in java and how to add new line character to a String in different operating systems. Operating systems have different characters to denote the end of the line. Linux and new mac: In Linux, the end line is denoted by \n, also known as line […]

  • 17 March

    [Fixed] no main manifest attribute

    In this post, we will see how to solve Unable to execute jar- file: “no main manifest attribute”. Problem When you have a self-executable jar and trying to execute it. You might get this error. Unable to execute jar- file: “no main manifest attribute” Solution Maven You might get this error when Main-Class entry is […]

  • 16 March

    [Solved] SLF4J: Class Path Contains Multiple SLF4J Bindings.

    Learn about how to resolve SLF4J: Class Path Contains Multiple SLF4J Bindings.

  • 15 March

    Java read file line by line

    In this post, we will see different ways to read file line by line in java. Sometimes, we need to read file line by line to a String, and process it. Here are different ways to read file line by line in java. Java 8 Streams Java 8 has introduced a new method called lines() […]

  • 29 February

    Java long to String

    In this post, we will see how to convert long to String in java. There are lot of ways to convert long to String.Let’s see each one by one. Using Long.toString() You can use Long class toString() method to convert long to String. [crayon-67890dcb0324b351662988/] In case, Long can be null and you don’t want to […]

  • 27 February

    JUnit assertSame example

    Junit 5’s org.junit.jupiter.Assertions class provides different static assertions method to write test cases. Please note that you need to use JUnit’s org.junit.Assert class in case of JUnit 4 or JUnit 3 to assert using assertNull method. Assertions.assertSame() checks whether expected and actual object refer to same object. In case, both do not refer to same […]

  • 11 January

    Spring boot JDBC example

    In this post, we will see Spring boot JDBC example. As we already know Spring boot does lot of auto configurations which help us to avoid a lot of boilerplate code. In the case of JDBC, spring boot provides auto-configuration such as creating DataSource and JDBCTemplate objects automatically based on application.properties. So you just need […]

  • 02 January

    Spring boot devtools tutorial

    In this post, we’ll be looking up what does spring has to offer for developer experience. Overview Using IDEs like Eclipse, Spring Tool Suite, Intellij Idea a typical development setup includes an application code base that gets deployed on a Web Application Server like Wildfly or Tomcat or even Glassfish. The speed of development is […]

  • 30 December

    BigInteger in java

    In this post, we will see about BigInteger in java. Why do we need BigInteger? Java provides various primitive data types such as int, long , and double etc.but these data types can not handle very large numbers and will overflow causing issues in program. BigInteger is introduced in java to handle very large integers […]