Skip to main content

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.

java
0 votes
0 answers
10 views

Improve performance of method (in Java)

I need to improve the performance of my code. I have the following code: public List<ArticoliDett> settaArticoliPreSalvataggio(Iterator iteratore){ try{ List<ArticoliDett&...
bircastri's user avatar
  • 2,093
0 votes
0 answers
4 views

JavaFX won't initialize views

I've encountered with issue that JavaFX won't initialize any view or container by fx:id. And it throws NullPointerException with reference at object that i've already initialized. For an example i've ...
Drained's user avatar
  • 81
0 votes
0 answers
6 views

Data Migration of multiple tables from one database to other using Spring Boot and Spring Batch

I want to migrate from one database to other using Spring Batch and Spring Boot. I have learnt that we have to declare @Bean for step, Job, JobLauncher, ItemWriter, ItemReader. But for those beans to ...
XPulse's user avatar
  • 1
-6 votes
0 answers
21 views

Java: json object key returns 2 values, how to access these values individually?

This is my code: JSONObject jsonObjectQL = new JSONObject(qlResponse.asString()); System.out.println("print2: " + jsonObjectQL); Object graphqlValue = WorkplaceEmployerGraphModelObject....
Ramii's user avatar
  • 121
-4 votes
0 answers
18 views

Are persistence providers still typically used in Java nowadays?

I started learning hibernate like a month ago and the course I got on Udemy seems to use some outdated things like hibernate.cfg.xml files. I noticed some problems rely on persistence.xml files too, ...
Ovidiu Sampalean's user avatar
-3 votes
0 answers
17 views

Problen In I18n internationalization converting hindi language

I am developing a mini project using springBootMVC I18n internationalization concept. when i convert Hindi or Chinese language in browser ???? are come. But in other languages like France, German ...
Sanjay Kumar panda's user avatar
-1 votes
1 answer
25 views

Jackson INDENT_OUTPUT doesn't format properly - what am I doing wrong?

I've been trying to figure this out for a bit but couldn't pin-point my mistake. I have a JSON I'd like to read into Java objects, manipulate those objects, then write them to a new JSON. Code looks ...
anon's user avatar
  • 31
-1 votes
0 answers
32 views

Is it thread-safe by default to have nested CopyOnWriteArrayList?

Lets imagine I have the following code: class ClassA { final Integer i; final String; final CopyOnWriteArrayList<ClassB> l; ClassA() { ... } } class ClassB { final ...
Elektor's user avatar
  • 81
0 votes
0 answers
9 views

Android How to add pagination into AutoCompleteTextView

can you please help for how to handle pagination into AutoCompleteTextView, i have show data as dropdown list using custom adapter like this. SearchDropdownAdapter searchDropdownAdapter = new ...
Adil Saiyad's user avatar
  • 1,592
1 vote
2 answers
47 views

I want to know the space complexity of this function

I was writing this code, and I am confused about whether the space complexity of this question is O(N) or O(N^2). This is the function whose complexity i want to know: static pair[] allPairs(int x, ...
R Hermit's user avatar
1 vote
1 answer
19 views

How to Detect Unsecured Wifi Android

WifiInfo class provides getCurrentSecurityType function but it is available only for API level 31 & above. private static void detectUnsecureWifiNetwork(Context context) { WifiManager ...
Ghost's user avatar
  • 55
0 votes
1 answer
18 views

IntelliJ's GridLayoutManager doesn't shrink its children

Here's a simple demo. The main class displays a frame with a GridLayoutManager-managed panel. The panel contains a stack of JLabels with long text strings I expect the labels to shrink as I shrink the ...
demavi's user avatar
  • 185
0 votes
0 answers
10 views

How to run Sencha Cmd 7.8.0.59 on linux

After upgrading the java to version 17, I have to install the sencha 7.8 version. But in compare with other versions there is no way to choose Sencha CMD with jre included or not. So the versions ...
Vahe Akhsakhalyan's user avatar
0 votes
0 answers
14 views

Polling data from kafka topic giving exception

I am trying to poll data from a kafka topic- "topic-a". I am trying ot poll that using kafka consumer listener. I have provided the below details in the application.yaml file for kafka ...
Vatsav Kolluru's user avatar
-1 votes
0 answers
23 views

Array Index Out Of Bound Error for Finding an element in an infinite array by Kunal Kushwaha video

My Code public class InfiniteElement{ public static void main(String[] args) { int[] arr = {1, 2, 4, 6, 8, 9, 10 , 13, 16, 19, 20 ,23, 27, 40, 42, 44}; int target = 44; ...
UDAYA KRISHNAN.M's user avatar

15 30 50 per page
1
2 3 4 5
127963