Category "java"

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

page size in spring boot to get total size

the default size of page is 20, I want to be able to get all elements from endpoint url. to get 30 elements I set size like below : http://localhost:8080/api/in

Unexpected lock protocol found in lock file. Expected 3 found 0

In android studio I keep getting this error message when building. I've tried deleting the .gradle file multiple times and restarting the IDE but the error do

Returning ResultSet without close?

I would like to have a database connection managing class which I can use for simple SQL commands like SELECT, INSERT etc. by simple calling something like this

Intellij IDEA - Maven not working

I cannot see the list of maven archetypes ("Loading archetype list...") or import an existing maven project in Intellij IDEA 2016.3.4. I tried several things: