Category "java"

How to sort a array with a function and using a code like this in java

Hello i have a java Code where i the Programm should sort the variable num but it only gives out some weird strings. I would like if you could help my with some

filter search bar not showing up

I'm trying to create a filtering search bar to sort through a limited set of data pulled from an API. The code compiled successfully, however despite having an

How to split input text file that has string and doubles?

I am to read from an .txt input and sort into array by line (read: first name, last name, grade1, grade 2, grade3) but I am having issues. I am assuming that I

How do I take the repeated values in an array and print out the number of duplicates using a for loop ?(Java)

I have written the following program which takes the duplicates in the doubleArray and adds them to a counter. Then I wrote a for loop to print out the values i

Running JAR from BAT file cannot find natives path

I am running my JAR from a BAT file on Windows 7 x64 machine. Lately I added native .dll files to project, so now I need to add the path to the BAT. My project

Inappropriate Intimacy in factory

My Factory has dependency on Repository. It calls many methods from Repository. Lets say something like this: class CarFactory { private Repository reposito

How to Imbed NiceHash Website Widget into Android App? Would it be WebView?

I would like to put this Profitability calculator from: https://www.nicehash.com/widgets#profcalc Where the site says to use: <iframe src="https://widget.nic

How can I use "NER" for German Language with stanford-corenlp?

I am trying to use nlp for german language but it does not work! I was making the pipeline and then NER to find the entity of each element in sentence which is

Returm to a specific line or place

I'm self learning Java for a few weeks and started testing my (basic) knowledge. I was trying to create something like some formula calculator, with an index se

Spring boot application fails to start after upgrading to 2.6.0 due to circular dependency[ unresolvable circular reference] [closed]

Spring boot upgrade Error Spring boot application fails to start after upgrading to 2.6.0 due to circular dependency Error creating bean with

spring data extension for quarkus datasource name

I want to use the spring data repositories in my quarkus application with jpa. As long as I use the default datasource and no named persistence unit, I'm able t

Adjacent package does not exist

I have a public class Mountain in Four\ Seasons\ Lab/things/Mountain.java and try to import the class public class Triangle, which is in Four\ Seasons\ Lab/shap

What method in Java returns the absolute difference of two integers?

Is there a method in the Java Math class that returns the absolute difference of two integers? int absDiff = 8 - 15; int answer = 7;

Filter a tableView leaves some data in a specific column

I have made my table view with column and everything works fine. just one thing that I have remarked is that when I filter rows, some data stay in a column that

error: bad operand types for binary operator '&&' first type int and second type boolean

I am new to java and I really enjoy this new learning experience. I got assigned a task where we have to create a simple calendar where the user needs to put a

JavaFX error: Event Handler is not in the namespace

I am creating a JavaFX application. I can start the application and login but when I try to access the Customers Scene, I get the following error: (Sorry in ad

Spring @DependsOn For Different Profiles

I have two different beans for the same class with different configurations depending on the given profile. @Bean @Profile("!local") public VaultPropertySource

Checkmarx report sql injection JpaRepository

im running Checkmarx on my code and im getting an sql injection vulnerability. this is the simplified method im using public String assignRole(String userId, St

How to check if a class has overriden a default method from an interface using Reflection in Kotlin or Java?

I have an interface with a default method, and two classes which implement this interface. One of the classes overrides the default method, and the other does n

How can I avoid ArrayIndexOutOfBoundsException or IndexOutOfBoundsException? [duplicate]

If your question is I am getting a java.lang.ArrayIndexOutOfBoundsException in my code and I do not understand why it is happening, what does