Questions tagged [java]
Java is a high-level object-oriented programming language. Use this tag when you're having problems using or understanding the language itself. This tag is frequently used alongside other tags for libraries and/or frameworks used by Java developers.
1,919,395
questions
0
votes
0
answers
2
views
Whats missing on my code for not adding the objects to my ArrayList?
I'm trying to make a simple program just to learn more about OOP but I can't see whats missing on my code for not being able to add an item to my ArrayList. Could you have a look and briefly explain ...
-1
votes
0
answers
5
views
Why can't I use a fourth Servlet in JAVA EE?
I hope you are well. I have the following situation: I am working on a project in which I initially used 3 servlets and everything worked very well, the problem was when I tried to create a fourth ...
1
vote
0
answers
10
views
Ordinal enum mapping with hibernate 6.5
I'm upgrading hibernate from 6.1.7 to 6.5.2, there are many enum columns in my entities marked with
@Enumerated(EnumType.ORDINAL). My codebase has to run against both oracle and sqlserver.
The problem ...
0
votes
0
answers
2
views
Why Java Spring App get Memory leak when I use PSPDFKit then app crash
When I directly fetch documents without using PSPDFKit, Memory functions as expected. The Memory leak seems to be isolated to working with the PSPDFKit library. Rendering many pdf files can fill 2GB ...
0
votes
0
answers
17
views
get current city name
I am trying to get current location and current city name.
But the cities in different language has different name.
For example Florence and Firenze are same city. I change geocoder language, but ...
0
votes
1
answer
10
views
NoClassDefFoundError exception after updating to the latest maven-surefire-plugin and latest junit5
I've got the following issue while I've been trying to use latest version of the JUnit5 (5.10.3) and latest version of the maven-surefire-plugin (3.3.0).
Caused by: org.apache.maven.surefire.booter....
1
vote
0
answers
13
views
How to implement proportional guidance in 2D
I would like to preface this by saying I am not a dedicated game developer.
I am trying to implement proportional navigation in order to create a missile class that receives the target location every ...
0
votes
0
answers
6
views
Query is not fetching the latest data from MySQL while using FOR UPDATE clauses
I have a table which locks rows as per accountId and a lock status column having values 0 and 1.
CREATE TABLE lock (
id INT(11),
accountId INT(11),
isLocked TINYINT(2),
);
The requirement is ...
0
votes
0
answers
8
views
Alternative row colors in a Android Custom keyboard
I am trying to create custom keyboard which is working fine, however, I want to give two colors for alternative rows. I have keyboard view xml and key_background and key_background1 defined, the code ...
0
votes
0
answers
7
views
Flutter Android Plugin has IDE errors when using Android Studio
I create a new Flutter Android Java plugin like so:
flutter create --template=plugin --platforms=android -a java sample_android_plugin
I open the project on the current latest version of Android ...
0
votes
0
answers
8
views
Hibernate HQL query validation error for join-fetch with conditional logic
I'm encountering an issue with a Hibernate HQL query where I'm trying to use conditional logic within a join fetch clause. Here's my query and entity setup:
I have two entities LovMst and LovVal with ...
0
votes
0
answers
17
views
Java spring authentification gets 403 forbidden while having the authority
When i send a POST to http://localhost:8080/api/v1/auth/signin it gives the token. Verified using jwt.io and is good, but when i try to acces a GET to http://localhost:8080/api/v1/books i get 403 ...
-2
votes
0
answers
29
views
How can i find both the index of same element in an array Java?
int[] array = new int[] {5,7,7,8,8,10};
int target = 8;
int first = 0;
for(int i=0;i<array.length;i++) {
if(array[i] == target)
return i;
else
return -1;
}
// Output should ...
0
votes
0
answers
6
views
How to interpret the EDA data measured by this Pixel Watch 2
I have obtained the EDA data measured by the sensor on Pixel Watch 2, and its format is as follows. How can I get the value of EDA from here?
[-141321.17, 24345.795, 170964.33, 307552.9, 131182.25, -...
0
votes
0
answers
17
views
Make AWT window adapt to the size of its child
I want the frame expand and shrink automatically as the label text length changes (that is, shrink if it's wider than necessary, expand if it's become too narrow)
How do I achieve it?
package ...