Mike Simmons wrote:1240528 is not a random example - it's today's date, 2024-05-28, formatted according to the format given in the original post, 1yyMMdd. It contains no time info, only date. This can be reversed to parse a given string as a LocalDate, e.g.
Ron McLeod wrote:
Kiran Er wrote:Can anyone help me with a java code which can convert below json into list of hashmaps
This may not be the best, but you could use Gson
Jack Tauson wrote:I found this.
https://blogs.oracle.com/javamagazine/post/transition-from-java-ee-to-jakarta-ee
Do you think this is still an up to date reference to figure out what things were involved as far as javax to Java EE conversion is concerned?
Paul Clapham wrote:Interestingly, it let me use Structured Concurrency classes without checking the "Enable Preview Features" box in the project's properties. Not even a warning. Although it might have been different if I'd tried running the compiled code outside Eclipse, I suppose.
Stephan van Hulst wrote:That would be a really bad idea.
In essence, that means that I can no longer control whether and how a caller makes an instance of my class, and it also means that I can create instances of classes without providing the bare minimum of information they need for initialization.
Consider the following example:
First of all, you're not supposed to instantiate an Integer directly. You're supposed to use a literal or one of the valueOf() factory methods. Secondly, if you DID instantiate an Integer directly, then what would it even mean to instantiate one without a value?
Remember, according to your proposal, Integer should inherit the parameterless constructor from the Number class.
Tim Holloway wrote:Java supports a "universal" file path notation which is essentially that of Unix. There are conversion rules that can map DOS paths to this notation and they necessarily include the drive ID. So "C:\Program Files\java" maps as "/C:/Program Files/java". Resolving in the other direction is ambgious, so expect that "/" will map to the root directory of the currently-logged drive.
Assuming you're not doing something stupid like uploading/creating/altering files within the WAR directory structure. Which will fail horribly on an unexploded WAR.
One final note. Java is a very bad language to use a "current directory" in. There's only one current directory for a given JVM instance, and since many processes may be running under that JVM, you can not be 100% sure that one of them might change the current directory programmatically at any given time. So as a rule, absolute paths are preferable, the Universal path notation is likewise preferable and ideally that path should include the currently-logged disk when running Windows.
Anil Philip wrote:
PS C:\> wsl
ANIL-PHILIP-LAPTOP:/mnt/c$ sudo mkdir /Try/tea/
ANIL-PHILIP-LAPTOP:/mnt/c$ sudo mkdir /Try/tea/earlgrey
ANIL-PHILIP-LAPTOP:/mnt/c$ sudo mkdir /Try/tea/hot.txt
I can see it did create the files
ANIL-PHILIP-LAPTOP:/mnt/c$ cd /Try/tea/earlgrey/.././hot.txt
ANIL-PHILIP-LAPTOP:/Try/tea/hot.txt$ cd ..
ANIL-PHILIP-LAPTOP:/Try/tea$ ls
earlgrey hot.txt