Java 8 – Convert java.util.Date to java.time.LocalDate

Straightforward conversion of java.util.Date to java.time.LocalDate    Java java.util.Date d = new java.util.Date(); java.time.LocalDate localDate = d.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); DateToLocalDate.java hosted on GitHub *...

Java Example of a Facebook Messenger Webhook Implementation

Java implementation of a Facebook Messenger Webhook. Note that it is a requirement to have an SSL certificate for the webhook. For development, I did not have a certificate, nor a public IP. I got around that by registering an account at NGROK and letting NGROK handle...

Java Inheritance Demo

A simple demonstration of which methods get called at which point when there are many levels of inheritance, some with overridden methods and others without overriding methods.    Child.java package preiss.inheritancedemo; public class Child extends...

Java Collections.binarySearch Example

Java Collections.binarySearch is a useful method for finding and element in a list or inserting an entry in the correct ordered position within a collection.    CollectionsTest.java package preiss.collectionsbinarysearch; // Java program to demonstrate...

Java SNMP Trap Receiver and Sender

A java example of an implementation of an SNMP Trap Receiver and SNMP Trap Sender.   SNMP TRAP RECEIVER JAR Required: snmp4j.jar at http://www.snmp4j.org/html/download.html View the code on Gist. JAVA SNMP TRAP SENDER JAR Required:  snmp4j.jar at...

Pin It on Pinterest