Skip to content

Tag: java

Why am I not getting the minimum value in an array JAVA?

Output: Answer Hello and welcome to StackOverflow. Next time, febore you jump into the internet for help, please try this approach. It will solve your problem much quicker. This process is called “debugging”. It can be done by adding spurious amount of logging like above or by stepping through the…

Method to get and post Json object in Vertx

I’m new to Java and to backend development, and I really could use some help. I am currently using Vert.x to develop a server that takes in a Json request that tells this server which file to analyze, and the server analyzes the file and gives a response in a Json format. I have created an ImageRecognit…

How to remove from list if list based on condition

I have a list of objects like this: I want to iterate the list and only keeps the objects where the dates differ. If there are two objects with the same date then I want to keep the object with the bigger value. Can this be achieved by using streams and predicates somehow? Answer You should use Map and Map.me…

Why does this code get stuck in the inner while loop? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question It stucks at i = 122; what is wrong? how can it keep looping in the while? …