java (41)

Java working with databases

Introduction In this Post I will describe how you can easily learn, test and play around with Java interacting with SQL Databases. This post is a summary of my Java learning course I'm taking on udemy. The post is not intended to be spread around…

Continue reading...

Java basics: Dates and Time

Local date Now Let's start with the basics, we just want to represent the date today and print that local date now: public class TimeTest { public static void main(String[] args) { LocalDate now = LocalDate.now(); System.out.println(now); } } output: 2022-08-29 Process finished with exit…

Continue reading...

Java basics: Optionals

What are Optionals? For the the number one use case for them has to do with null values. So whenever we're dealing with objects in Java, we store references to objects in variables. And those variables may or may not actually be pointing back to…

Continue reading...

Java basics: Generics

What are Generics? What if we could write a single sort method that sort the elements in an Integer array, a String array, or an array of any type that supports ordering? Java Generics enable programmers to specify, with a single method declaration, a set…

Continue reading...

Java basics: Exceptions

What are Exceptions? An exception is an event, commonly it is a problem that arises during the execution of a program. When an Exception occurs the normal program is disrupted and the program/Application terminates abnormally, which is not recommended. Unexpected termination of an Application is…

Continue reading...