Skip to content

Tag: java

Is it possible to work with json type in java spring boot?

Is it possible to work with json type as in javascript without generating JSONOject in java spring boot? Is it possible to work with the { } format without creating a JSONObject? Answer JSON stands for “JavaScript Object Notation”. The Java Syntax does not support JSON. Therefore, we cannot use JS…

How can I create an Array in Descending Order?

I’m working on this project using Arrays. I have a method called createRandomIntArray that creates an array. This method is meant to return the Array in descending order. I have been able to do just that but I want to know if there is a more effective way to write this method than the way I wrote it. I …

Enum Skeleton Table

Hello I’m just wondering if there is anyone that could make sense of this java skeleton code table for an enum class. Table: My code currently is this: Is that it? or am I supposed to incorporate the int in some way? Thank you. Answer Every enum includes two properties by default: so, int is already inc…

How to add on last string comma in list?

I have this part of code: and i get this : 9000;9001 but what i want is 9000;9001; so on last string to add ; also. Any suggestion? Answer I don’t know if you are working with an array or a ArrayList/List. For an array: For a ArrayList/List: