Skip to content

Tag: java

Change all letters except space from a string using Java

I want to change all letters from a string to “-” char except space using Java. I tried: and They didn’t work. I tried: It worked but i didn’t change Turkish characters I use in that string. Original Code: Answer You can use the \S regex:

Dynamodb get a single item based on sort key only

I am new to dynamodb and I need to process 5M records. Each record has an id and a status. I need to query for each record based on its status, process it, and finally update the status. I am using DynamoDbEnhancedClient but I could not find example on how to query based only on the range and not the

Doubly Linked List adding null

I’m new to Java. I want to make student information system, but whenever I used the addStudent method, I get a list with null values. This is the student class for getting names telephone numbers and student ID. This is the Node class. Methods can be wrong maybe they are too complicated sorry for that. …

How to split an array of objects in java or Kotlin?

I have already asked one question about this here but, that answers about only strings. I could not edit that as there a couple of answers there already. Now, I get it how to split it with a space as given in that post. But, how can I split it with objects of custom class like this: Now, I want

How to solve KeyError: 400 Bad Request

I have a server to which I want to send post requests in the form of json in Java. But after sending, it gives the answer: “KeyError: 400 Bad Request: The browser (or proxy) send a request that this server could not understand.”. No matter how I change the data, it still gives this error, and the …