Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static void main(String[] argv) throws Exception {

        SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss Z");
        Date date = (Date) formatter.parseObject("22:14:02 -0500");
        System.out.println(date);
    }
}