Category "java"

How to use variables from other Activity for buttons in Custom list view Android studio

I am currently building a bare bones game app for university. In the Shop activity of the app I have created a custom list view in order to display items in the

Different @QuarkusTestResource per Quarkus profile

I have just set up my project to use H2DatabaseTestResource in the tests. I also have created a custom PostgresDatabaseTestResource, following this brilliant bl

Google SSO login is not working in my Android app for the last one week, Showing the account selection dialog continuously

From the last one week the Google SSO login is not working in my Android app and it keeps loading the account selection dialog even after selecting the account.

How to handle reactive types within Reactive Spring Integration?

I'm playing a little with Reactive Spring Integration and I try to perform the following basic operation: @Override protected IntegrationFlowDefinition&

My component scan on Spring 5.3.18 does not work

I have little problem with spring ComponentScan in my application. Here is my Test spring configuration: @Configuration @ComponentScan(basePackages = {"com.dhl.

How To Test Login Method In JUnit?

I have been using white box testing with JUnit to test some methods that I have in my DAO Implementation class. I am trying to test the login functionality, whi

Can I prefill Mobile number field in stripe express Onboarding?

Can I prefill the Mobile number field in stripe express Onboarding? Image This is my code, Here I am able to prefill all fields except phone number. I have tri

Copy image from xls to xslx using Apache Poi

I'm trying to copy an image from a XLS to a XLSX, using Apache Poi 4.1.2. I'm not able to calculate the right value for dy2. My code: package poisamples; impor

Why I can't send data from child fragment to parent fragment?

I have a parent fragment with 2 children fragments (home, detail). Inside the parent fragment, there are 2 button to change both children fragment: btn_home and

Spring Mvc integration test fails

I want to write an integration test for a delete method in my controller, but no matter how many times I tried rewriting it, I am still getting different errors

How to check if a player has collided with any wall Java

I am making a maze game and I am trying to implement a wall feature that will restrict the movement of a player if he collides with a wall. I have created a wal

Java "Catalan number" generator is almost working right

What a Catalan number is: https://en.wikipedia.org/wiki/Catalan_number I am doing some Java exercises and a couple of the test numbers aren't passing even thoug

Create object hierarchy with string prefixes

I'm working on a project where a REST endpoint responds with a flat list of objects. These objects have a String name, a String shorthand and a String structure

Create object hierarchy with string prefixes

I'm working on a project where a REST endpoint responds with a flat list of objects. These objects have a String name, a String shorthand and a String structure

How to use Eclipse collection in Spring boot ResponseEnity in Java

So I need help in using java eclipse collections as part of the response using the spring boot Response Entity JSON . I have tried using the generic way but I g

java.lang.NoSuchFieldError: com/fasterxml/jackson/annotation/JsonInclude$Include.USE_DEFAULTS

I am using spring 5.3.7 and when I start my application, it returns the error below: Instantiation of bean failed; nested exception is org.springframework.beans

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet netbeans in netBeans

I'm developing a servlet that get a some detail from index.jsp form when i submit servlet throws following exception. I'm using NetBeans and Apache Tomcat/10.0.

Is there a way to enable inlay hints in VSCode for other languages like Java?

I noticed that inlay hints have been added to VSCode for TypeScript and JavaScript. I was just wondering if there was a way to enable it for languages like Java

Get current time without methods [closed]

I am trying to do it without methods so that I can better grasp the concept. I am really close. My hours math seems to be off. What am I not u

Getting "NumberFormatException" input string="" error and I don't know how to solve it [duplicate]

I'm trying to solve this question, but the NumberFormatException always happens. Using try-catch doesn't give me what I want because it always