Skip to content

Tag: java

Separate “for” loop iterations

How would I go about making each iteration of my four loop be random. The outcome as of now makes all 20 sentences put the same output, although it is choosing random words each time from the four arrays created in static class OuterWord. I have omitted the parts of the code that I don’t think are neces…

JPQL query that give me the highest value

I’m trying to do a JPQL query that give me the highest PK of the PKs in my table (https://drive.google.com/file/d/1_kaklkKdCbhT0-byqCtz6HgfluKKp8J-/view?usp=sharing). Here is my query : The error says that the syntax of my query is wrong. Can someone please help me ? Thank you for your help πŸ™‚ Answer Tha…

Java Synchronized on the same file, but not different

I have this static class: that have lots of methods and this one above is one of these. what I would like to do is that if two callers write to the same file, the writing should be done in mutual exclusion. But when callers write to different files, this doesn’t happen (they don’t write in mutual …

Azure Blob Storage Java SDK 12 extract file name from blob name

let’s say I have blob structure like this: dir0 β”œβ”€β”€ dir1 β”‚ β”œβ”€β”€ file11 β”‚ └── file12 β”œβ”€β”€ dir2 └── dir3 After listing the dir1 that contains two files file11, file12 with listBlobsByHierarchy(“dir0/dir1/”) method I’m getting two blobs with blobName property set to dir0/dir1/file11 and dir…