Skip to content
Advertisement

I implemented Serializable but it still give me exception

this is my code: i dont know where is the error I search every where but I didn’t get the answer so any one of you guys have the answer for my question? because I’m new to files, and i want to complete this project Answer Everything field inside a Serializable has to either be null, or be refer to

Newest version Postman creating different signature for AWS access compared to my java algorithm

So I’ve created the java algorithm for AWS signature creation, following the guidelines of AWS >https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html The algorithm is available on my github >https://github.com/marcodag/aws_signature_creation/blob/main/SignatureCreation.java These are the steps that I take: retrieve secret key, access key and token from AWS account create call on Postman (for Linux) v8.12.5, by using AWS Signature auth the call goes OK. I retrieve the

How to repeat an array together with a counter

What I’m trying to do with the following code is to print numbers and to replace the number with a word for the number that are divisible for 3, for 5 and for both 3 and 5. So, when the user starts the code, it has to choose how many players are going to play. The problem is that my

How to properly null check/lazy load

I have a resource file that I load, when needed, to check if a certain word is among the ones in the file. I want to get rid of the method-wide synchronized keyword. There’s no point in all threads waiting while wordsInFile.contains(word.toLowerCase()); runs. Original: Is this OK? Answer This is a variant of @Stewart answer. You can handle lazy load

Find date inside each month

In my project, in the repository, this select finds the nearest date with a currency id that is less than or equal to the date whose range I set. How can I find a date in each month that is greater than or equal to the date I want to bind, but with the condition that this date must be

Checking a number for parity

To check that both expressions are true, you need to use &&. Syntax expression1 && expression2 In this problem, you need to check that the number passed is positive AND even my code: test: error: java.lang.AssertionError: expected [true] but found [false] at org.testng.Assert.fail(Assert.java:93) at org.testng.Assert.failNotEquals(Assert.java:512) at org.testng.Assert.assertTrue(Assert.java:41) at org.testng.Assert.assertTrue(Assert.java:51) at ru.job4j.sentence.LogicAndTest.test(LogicAndTest.java:14) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566)

Advertisement