1,918,329 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
25
views
How to write rdf4j Model to a string while preserving the original structure?
I have a plain java application that consumes a jsonld structured file, converts it to a Model class from rdf4j framework and then writes it as a string. The demo code is as so:
public static void ...
-2
votes
0
answers
57
views
Why am I getting "NullPointerException" when accessing an array element in Java? [duplicate]
I am learning Java, and I’m getting a NullPointerException when I try to access an element of an array.
Here is my code:
int[] arr = null;
System.out.println(arr[0]);
When I run this, I get the ...
-1
votes
0
answers
39
views
Is it possible to link/run Gradle tasks in comments in IntelliJ Idea? [closed]
I am using IntelliJ Idea with Gradle. Take for example:
/**
* Make sure to run the runData configuration before starting the client
*/
could runData there be substituted for something clickable/...
Best practices
0
votes
1
replies
57
views
Does it safe to modify the oldValue of remappingFunction in java.util.Map#merge?
I want to implement something like this:
Map<String, List<String>> m = new HashMap<>();
for (... in ...) {
String key = ...;
String val = ...;
m.merge(key, Lists....
0
votes
0
answers
41
views
Mockito ArgumentMatchers.any(Class) for varargs parameter does not match
I have test method using mockito 5
@Test
public void test_increaseUserScore_Successful() throws CannotCreateCachedUserException {
when(cachedUserRepository
.existsById(...
-8
votes
0
answers
84
views
I need to create an array that contains the values of the attributes of an object, but Object.values(obj) does not work [closed]
I need to create an arraylist, that contains an array of objects to act as the rows of a table, like this:
ArrayList<Object[]> rows = new ArrayList<>();
each of these Object[] arrays will ...
-3
votes
1
answer
49
views
How to integrate one app into another app without installing another app in android studio? [closed]
Here i am asking how to integrate app.For example we have two apps - app1 and app2 we have to integrate app2 into app1.We install app1 and we don't need to install app2.We can access content of app2 ...
-4
votes
0
answers
55
views
Push Notifications not working in my Vite + React + Spring Boot project (WebSockets, VAPID, AWS SNS, FCM all attempted) [closed]
I am trying to implement web push notifications in my project, but none of the approaches I tried are working. I’m not sure whether the issue is on the frontend, backend, service worker, or the push ...