Tag Archives: Java

7 different ways how to get NumberFormatException in Java

This article will show you the NumberFormatException, how you are getting it and what you should do to handle the exception properly. Continue reading

Posted in Language basics | Tagged , , , | Leave a comment

How to figure out if a character in a string is a number

This article is about multiple ways to pull a character from a string and check if it is a number. Continue reading

Posted in Tips & tricks | Tagged , , , , , , | Leave a comment

How To Turn Number To String With Padded Space or Zeroes

Article about a simple solution to turning numbers into specific length String with padded space. Continue reading

Posted in Tips & tricks | Tagged , , , | Leave a comment

Flattening Stream Collections in Java

This article is about flattening the list of element list with use of Java 8 stream feature flatMap and forEach Continue reading

Posted in Language basics | Tagged , , | Leave a comment

Selenium – remove html element from the DOM

This article will show you how to remove elements from HTML DOM (Document Object Model) when using automated web-browser framework Selenium. Continue reading

Posted in Tutorials | Tagged , , , , , , , | Leave a comment

How to print current project classpath

This article is a short explanation of a classpath and a single line of Java code that will help you print out your classpath. Continue reading

Posted in Tips & tricks | Tagged , , | Leave a comment

Verify method was called n-times with Mockito

Mockito Verify example for n-times calls using various verification modes. Continue reading

Posted in Testing | Tagged , , , | Leave a comment

How to check if two lists are equal in Java

A short article focused on a widespread problem in testing if two list instances are identical, or rather say if they contain the same elements in the same order. Continue reading

Posted in Testing | Tagged , , , , | Leave a comment

How to convert a Map to an Array in Java

This tutorial is about several approaches to converting Java’s Map interface implementations into the Java array. Continue reading

Posted in Language basics | Tagged , , , , , , , | Leave a comment

How to sort a map with Java 8

This tutorial shows how to sort Java Map implementations with Java 8 streams by map’s key or value properties. Continue reading

Posted in Tutorials | Tagged , , , , , , | Leave a comment