JCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
JoinJCH
Java Community | Help. Code. Learn.
We are a Community full of Java developers. Connect with other devs, get help, help others and do much more!
JoinI want to learn Springboot and webflux, need best resources recommendation
As said in the title, i have some idea about basic java, and i tried reading "hands on reactive programming in spirng 5" but i was lost. Someone told me i could jump into springboot, rather than learn spring first. If someone could help me with how i should proceed and which resources to use, that would be great. Thanks!
Two Sum Problem on leetcode
Hi guys, I can't seem to figure out what the problem is here:
class Solution {
public int[] twoSum(int[] nums, int target) {
...
Study guide
Hello, Im a 4th year cs student, I'm good in ds and algorithms, OOP and java core.
So my question is can i start with spring boot now or is there any requirements i should learn before?...
ResponseEntity incorrectly maps values
I have two entities: Product and Variant. Each product has a set of Variant. To get a product, I have a controller endpoint:
http://localhost:8081/api/products/{id}
Hence to call a product, I'll have to call this endpoint:
```
@GetMapping("{productId}")...
JSON Schema Validator with message option
Hi People,
I'm using Katalon for test design and i need to validate a json response against an schema, but most of the ones i've found doesn't allow me to set a custom error message in case any specific part of the schema fails the validation.
The question is, is there any java json schema validator that works with java 8 and allows me to set custom error messages to the schema parts ?
...
Flow chart to Java.
Hello! I was given a flow chart with no instructions on how to turn it to code. It's meant to be super basic because all we have really learned are scanners, strings, while, if, those kinds of things. I have been working on this for almost two days and keep striking out. I have included a screenshot of what I have figured out to so far.

Need help obfuscating project
Im making a Minecraft 1.8.9 Forge mod and want to obfuscate my project with ProGuard. I linked my gradle build file and my proguard rules file.
Error im getting while building:
...
Can't find common super class of [InstallerFrame] (with 1 known super classes: InstallerFrame and 1 unknown classes: javax.swing.JFrame) and [java.lang.Exception] (with 3 known super classes: java.lang.Throwable, java.lang.Object, java.lang.Exception)
Can't find common super class of [InstallerFrame] (with 1 known super classes: InstallerFrame and 1 unknown classes: javax.swing.JFrame) and [java.lang.Exception] (with 3 known super classes: java.lang.Throwable, java.lang.Object, java.lang.Exception)
AVL trees
I have a error in a Java AVL tree implementation. I'm not finding the error, its should be something about restructuring of the tree. Any help would be appreciated.
unable to locate png from location on pc
```
try {
image = ImageIO.read(new File("C:\Users\mikso\IdeaProjects\UPT\src\main\resources\draggg.png"));
} catch (IOException e) {
e.printStackTrace();...
Unable to catch MethodArgumentTypeMismatchException on doFilter()
I have a filter that basically logs incoming and outgoing information, but it seems that using this custom
RequestLoggingFilter implements Filter creates a problem, I get MethodArgumentTypeMismatchException when a request's URI is unmapped.
Error as follows:
```
org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Long'; For input string: "all"...Adding character/s to a string has two different variations.
If you add two characters to a string you get an int as an output but when you add one character it works.
Please explain. Here is an example with output for reference.
```java
String str = "eeksforGeeks";
...
My code will only return the perameter
In my unacceptable date method, i have code so far that finds if the year of a date are integers. It works when allowing the user to reenter the date, but the reentered date doesnt go into my txtfile, the original date does. I have used ab24-08-24 to show the incorrect date going into the text file. I return the date outside of a for loop and it returns the first incorrect date written which is the perameter.
Testing Framework in Java
* Hi Team,
What is the recommended testing framework or the most use
testing framework for testing Java applications?...
#StartSETUP
Greetings.
I admit I'm starting to learn what I can learn. And now I'm trying to learn About JPA. After I generate with JPA, SpringBoot Devtool, and also Posters SQL dependency, I want to connect to my database.
But, for 3 days I've stick with this same error:...
Game Logic
Hello everyone,
I've build a program that simulates a scenario where three numbers are input by the user, and the program calculates the waiting time and movement between three cells for optimal and fastest time to get to the end.
But now I am stuck.
Why does it output "31" when you put 5 in zahl1, 8 in zahl2 and 21 in zahl3 when it should say 24 since that would be the most optimal path?...

Jackson Mapper - String[] conversion possible?
This should be trivial, but I cannot figure out how to do it. In looking at custom annotations and additional registered serializers, I must be missing something.
`import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.impl.StringArraySerializer;
...
Error Handling with try and while
Hi guys 'm a total newbee, when I call this function it just prints "Input cannot be empty. Please enter a valid string." forever and disallow me to enter anything after first attempt, How do I correctly incorporate error handling here?
"""...
Guys, is there anyone here who can help me find the spawnrate of structures in a Minecraft .jar file
I need help finding the spawn rate of structures in a Minecraft .jar file I decompiled, but is obfuscated, for my IB Internal Assessment.
How to find generics when running a java process
I'm generating code out of code. To do this I need to scan code to generate the code, this includes generics. Currently I'm using classgraph as the scanner for the code, but it does not look like it supports generics (I believe it's runtime, so generics don't exist there).
Does anyone know a way to programmatically fetch generics from a library?...