Category "java"

Print Axis2 Request Response XML

I want to print RAW Request Response XML to console. I have created the stubs using wsdl2java axis2. wsdl2java has created 2 java files, one for stub and one

How to get all data of a particular DataType from google fitness store in android

I need to get all data of a particular DataType eg: "DataType.TYPE_HEART_RATE_BPM" from the fitness store. In the following code, I am requesting data with star

How to sum digits of an integer in java?

I am having a hard time figuring out the solution to this problem. I am trying to develop a program in Java that takes a number, such as 321, and finds the sum

Android Studio R.menu error

Full Code: package restfulapiclient.tutecentral.com.restfulapiclient; import android.app.ActionBar; import restfulapiclient.tutecentral.com.restful

Android Studio R.menu error

Full Code: package restfulapiclient.tutecentral.com.restfulapiclient; import android.app.ActionBar; import restfulapiclient.tutecentral.com.restful

Stack overflow error in java concerning inheritance

I am working on a project for my intro to java class and am working on inheritance. The problem is with the classes Mammal and Pet. When I run the driver clas

Karate 1.0.1 NullPointerException when sending a number in a PUT request

Going from karate 0.9.5 to 1.0.1 I found that sending a PUT request with a number returns a java.lang.NullPointerException. e.g. In v0.9.5 this was working: Giv

How to add items to a list of lists

I aim to print a list of lists containing entry and exit times in the 24 hour decimal format from the "AM"-"PM" String format input by the user as a String arra

The best layout for this image?

I don't know which is the best layout to use for this image, I think maybe grid layout (5*1) may be helpful but I can't add multiple components in one grid layo

Customize default getter/setter template in IntelliJ

I have created a custom template for setters in IntelliJ. I can chose that template when I use Alt + Insert and it works great. However when I try to press Alt

Braintree Integration - Error: Class not found: com.braintreepayments.api.dropin.DropInRequest

so we are currently trying to integrate Braintree in our Android App in Sandbox Environment. We have set up a server with WAMP, which is generating a client tok

Sum all odd indexes in an array

I have to complete a program according to these instructions: public class SumOddIndex { public static void main(String[] args){ int[] array = {1,1,

Spring Interceptor has different traceId for afterCompletion method with Spring sleuth 3.x.x

I am currently working on a Spring boot project. Recently I upgraded the version of my Spring boot from 2.3.3 to 2.6.6. In Spring boot 2.3.3 I was using Spring

Why does Java allows to initialize semaphore with negative permit?

I'm not getting the rationale behind negative permits during initialization of Semaphore (java.util.concurrent.Semaphore). I do know that calls to release() met

Sum all odd indexes in an array

I have to complete a program according to these instructions: public class SumOddIndex { public static void main(String[] args){ int[] array = {1,1,

Eclipse BIRT not working properly on new mac

I recently started using the new macbook air (M1 chip Big Sur 11.2.3) and I can't get eclipse BIRT to open properly on it. At first my workspaces were blank and

Minecraft bukkit plugin right click item

I am making a plugin for a server I am developer on and I was developing a plugin! I wanted to do commands to spawn a boss egg in by doing /boss give lvl <lv

Fixing WindowBuilder UI

The bug is hard to explain so I will add images to show my problem. As you can see in the provided picture the interface is completely empty. Does anyone know h

Delete top or bottom n elements of a map

I have a HashMap like below: map.put("1","One"); \\KV1 map.put("3","Three"); \\KV2 map.put("2","Two"); \\KV3 map.put("5","Five"); \\KV4 map.put("4","F

How to remove ripple effect from MaterialCardVew?

How can I disable touch ripple effect of MaterialCardView? Setting clickable attribute to false or playing with foreground and background attributes had no effe