Category "java"

Admob Android SDK 20.x : how to init InterstitialAd?

I update my app with Admob Android SDK 20.x. In the previous versions of the SDK, it was possible to do something like this (in order to avoid to repeat the cod

Android project can't find net.sourceforge.jtds.jdbc.Driver

I want to connect database to android project using android studio and sql server management studio. I add dependencie in build.gradle, but when I try to login

Problem with a recyclerview adapter in android?

I am working on a game called Space Mines. I am trying to get a list of planets on the screen, but am having trouble and do not know why. I try to debug the app

Soap Request with Apache Camel

i have a wsdl file hosted on a site (which i can't share), and i want to invoke a soap request through apache-camel framework. I created a maven project, and us

Livedata with large dataset in Room DB - Does the whole dataset get loaded from database when onChanged() gets called?

I have a Room entity as so: @Entity(tableName = "user") public class User { @PrimaryKey @ColumnInfo(name = "id") private int id; @ColumnInfo(n

How to print amount of occurrences of specific string in descending order?

I'm looking to use a String[] of logs detailing users who have connected to a website to print out in descending order the amount of times each user has connect

when i add opcion forEach method get java.util.ConcurrentModificationException: null

I have a problem, I have a question entity and an option entity, the relationship is one to many. but when I want to add the options in the question, it shows m

CodingBat - Java - Warmup-2 - "stringYak" algorithm

I'm presently trying to understand a particular algorithm at the CodingBat platform. Here's the problem presented by CodingBat: *Suppose the string "yak" is unl

DataInputStream stuck when initialized

I have been trying to send a byte[] array across my client / server application using Sockets, DataInputStream and DataOutputStream, but on the server side, the

Get Elements of a webpage in a webview

I'm trying to get the Elements of a webpage in a webview. These are actually values of an odometer. I'm using sketchware. I've tried getting the class values wi

Is using @Nonnull (javax) on entities with Hibernate a bad idea?

We are using Hibernate in our Spring Boot application. Whenever we can, we use @javax.annotation.Nonnull and @javax.annotation.Nullable annotations to help us a

Avoid using deprecated API for UtteranceProgressListener

I am using android.speech.tts.TextToSpeech and would like to have an UtteranceProgressListener that does not override the deprecated onError but rather uses the

OpenAPI throws Could not resolve reference: Could not resolve pointer: for @ExampleObject files

I am developing a Quarkus service-based application for which I am adding open API based annotations such as @ExampleObject. For this, I would like to add the r

Four values to be non zero and non negative

Suppose I have four variables x, y, z, w. I want to print: "hello all non zero values" only if all x, y, z, w are non-negative and non-zero values. If all the

Java JDK 18 in IntelliJ prints question mark "?" when I tried to print unicode like "\u1699"

tldr: I downgraded to JDK 17 (17.0.2) and now it works... I was watching a beginners Java tutorial by Kody Simpson on YT (youtube.com/watch?v=t9LP9Nt9Nco), and

Get multiple times current time on single Button

I have a button showing text START when I click on it I shows me current time in textview.(I consider this time as start time). Than convert the text on Button

Finding Error in android studio java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT

I am new to Android studio. I am trying to connect to brother label printer QL-820NMB with the new Android APK (SDK 31) with android version 12 and the device

Increasing array size

I just started learning java and I'm having a problem in increasing an array's size with a new length provided by the user. If the user's input is greater than

JWT - Find private key by using the KID in key-store in Java

Good day. Is there a call in a Java that can use a KID from a JWT header that will find the correct private key in the key-store? I know how to do it, using the

What is causing connection reset in my tcp server?

This error can happen at anytime but the error message is not showing where it happens during runtime, Error message TCPServerhandler with the closing part TCPS