Changes for String Conversions
This commit is contained in:
parent
0930c78ff7
commit
6989041dc2
0
core-java/0.12457740242410742
Normal file
0
core-java/0.12457740242410742
Normal 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);
|
||||
}
|
||||
}
|
||||
|
2
core-java/src/main/resources/targetFile.tmp
Normal file
2
core-java/src/main/resources/targetFile.tmp
Normal file
@ -0,0 +1,2 @@
|
||||
line 1
|
||||
a second line
|
Loading…
x
Reference in New Issue
Block a user