Category "java"

What is the best way to Null check input fields in the request object in Java?

I have a Code Like this: Insurance Dto: private String accidentNo; private String birthDate; private String mobileNo; private String ssn; public Insurance

How to display Images from Internet in JavaFX(not working)?

I want to take the url of a image from a API, which I did. I also get the URL of the image that I want, but the image doesn't display in the JavaFX Scene. Strin

Creating Game using multithreading, but have problems with smoothness of background movement in Java Swing

I'm working on a project which is about creating a game. I was implementing threads to move my background but had some problems with the smoothness of backgroun

How to change a number written in a string form to an integer number

This is the code which I thought is supposed to work but it just returns garbage in the array I think and I've been trying to fix it but I can't find the error.

SELinux blocks execution of native executable on Android

I am trying to run my own native executable. The code looks like this: String[] command = {"/data/user/0/org.smowsoft.systeminformation.nativelib.test/files/smo

How to make in java an http post returning binary data using plain Sockets

Because some restrictions, I have to use plain Java sockets to download a file published in a http web site. This is how i am reading the response: String serve

Is there a way to use Tesseract OCR for Java without specifying the path of the image?

I am currently creating a spring boot application that allows the user to store a database of books to organize and search throughout. I have added a feature wi

How to Initialize 2d ArrayList with 0 in one line

How to Initialize all the element of 2d Array List in Java with 0 in single line of code without using for lop. ArrayList of m rows and n columns. How to initia

I have an error when creating a search and list view for my app

My app is linked to a microsoft server which has tables with employee names that need displayed on the app when searched. I also want whenever a letter is typed

confusion between post and get method [closed]

I'm creating an API which accepts customerid, account number and date as json objects and returns a file whose location is mentioned in the da

How to show 'NEW' tag after updating category recyclerView

How can I show NEW tag after updating category from database. Like this image Only after if my category get Updated and show for 24 hrs. This is my Adapter of

Sorting ArrayList<> based on Lattitude and Longitude in Android

I Have a requirement that has ArrayList that contains Latitude and Longitude (randomly).Is there any way so that I can get this list in a optimized way. Google

How to transfer external pages in Web View (Android Studio) to Chrome

I wrote a simple program and used webview. My problem is that links to pages that do not follow the https://irunisenter.com rule also open in the program. It's

Traversing through a 2D array

I am trying to figure out how to traverse through a 2D array. The way in which I have been doing it is by using a nested for loop. I am curious to know of any o

Java MDC Logger - methods with too many MDC.put()

Small question regarding MDC with Java please. At first, I had very straightforward methods, some methods with many parameters (I shorten the list of parameters

Error in getting table row value to be deleted/updated. String input as undefined

I am making a simple CRUD function for a bill management system. It uses Jquery AJAX JSON to communicate to the servlets. The update and delete functions are ac

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause

I have node.js c ++, java, python compiler. in some cases it returns node.js error without any compiler error

I have node.js c ++, java, python compiler. in some cases it returns node.js error without any compiler error: enter image description here enter image descript

how to send a byte array in kafka with Avro Schema registry

I'm trying to send bytes with a JSON object using a Java POJO and an Avro schema, with schema registry. So my question is, how should my code send "bytes" type

How to fetch a HCP file from Amazons3 bucket using objectId as input parameter is there any API?

I'm using getObject("filepath"); to retrieve a document /xml file from HCP. I need to pass an Object in input to the getObject(); method and retrieve the same.