ThreadLocal in Java

The ThreadLocal class in Java is a class that allows us to store and retrieve the values of variables in the same thread. As long as it’s the same thread, you can store a value and retrieve it whenever we want. You can initialize objects… Read More

Structured Concurrency in Java

Structured Concurrency in Java is an improvement of Java from Java 19, on implementing and maintaining code related to the execution of tasks consisting of many sub-tasks handled by multi-threading. This improvement makes our code easier to read, and controls how the execution of subtasks… Read More

Convert one object list to another in Typescript

Suppose I have a list of student information as follows:

with the Student class with the following content:

If I now define another class StudentInfo that also contains student information with more information about the class as follows:

To convert the list… Read More

Convert JSON data list string to object list in TypeScript

To convert a JSON data list string to a list of objects in TypeScript, you can use the parse() method of the JSON object. For example, I have a list of classes returned from the backend as a GraphQL response as follows:

On the… Read More