How to compare dates in Java
How to compare dates in Java using Date (compareTo, before, after, equals), Calendar(before, after, equals) and LocalDate(isBefore, isAfter, equals) classes.
How to get input from Java Console
How to get input from Java Console. Examples using System.console
, Scanner
and BufferedReader
+ InputStreamReader
.
Client Server Socket example in Java
Client Server Socket example in Java. Client example reading the input from the console. Simple echo server example.
Java Properties file example
How to work with java Properties files. Properties files are key values file. The tutorial contains both read and write examples.
Get and Set Field Value using Reflection in Java
How to get and set field value using reflection in Java. The tutorial covers all situations for a field: public, private and protected.
How to execute method using reflection in Java
How to execute method using reflection in Java. Example with all cases, with/without parameters and returning/no returning a value.