Changes for String Conversions

This commit is contained in:
Nikhil Khatwani 2016-10-25 22:34:25 +05:30
parent 0930c78ff7
commit 6989041dc2
3 changed files with 6 additions and 4 deletions

View File

View File

@ -2,10 +2,10 @@ package com.baeldung.java.conversion;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalTime;
import java.time.LocalDateTime;
import java.util.Date;
import com.baeldung.datetime.UseLocalTime;
import com.baeldung.datetime.UseLocalDateTime;
public class StringConversion {
@ -54,7 +54,7 @@ public class StringConversion {
return formatter.parse(str);
}
public static LocalTime getJava8Date(String str) throws ParseException {
return new UseLocalTime().getLocalTimeUsingParseMethod(str);
public static LocalDateTime getJava8Date(String str) throws ParseException {
return new UseLocalDateTime().getLocalDateTimeUsingParseMethod(str);
}
}

View File

@ -0,0 +1,2 @@
line 1
a second line