Java Programming Tutorials

Java programming tutorials with many code examples!

Java try with resources

Problem:

Java 7 finally has shipped try with resources construct that simplifies very common use case when developer had to open some resource and then close in finally block after usage. try with resources makes it very simple. Learn how!

Read More

Share with the World!

Bash while loop

Problem:

while loop is a basic construct in many programming languages. Bash also allows us to use it to iterate over many things. Learn here how!

Read More

Share with the World!

Spock Framework share object reuse

Problem:

You’ve got some very costly object to instantiate or it just doesn’t change through all the tests and just want to reuse it (for example DateTime object). Spock Framework allows to do it in an easy and readable way. Learn here how!

Read More

Share with the World!