Questions tagged as 'java'

1
answer

delete node in a binary search tree

I'm trying to make a method that removes a node from a binary search tree recursively but the code I have leaves everything as exactly the same. public void borrar (Node nodo, int n){ // recibe el nodo raiz if (nodo == null){ // si el nodo...
asked by 11.10.2017 / 03:34
1
answer

Directories and files in java

I have the following program: If it's a file, I want you to show me (route, name, size) if it's not a file show me then it's a directory. the data takes it out of parameter. The code: public class VeureInfo { public static v...
asked by 20.09.2017 / 21:15
2
answers

How do I launch custom events in java?

I have been investigating on how to add my own events to classes, but I have not seen any example of more than one event, so I have investigated how the java api had done it, and this is my result: public class EventoUno extends EventObject{...
asked by 18.09.2017 / 10:57
1
answer

Change the color of the components while they have the pointer on them

Most swing components change color when they have the pointer on them. However, I would like to personalize that color (they are always painted blue), I have searched for information but I have not found anything. I am particularly interested in...
asked by 19.09.2017 / 09:10
1
answer

Java XML file error

I have the following program: package exercici3; import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * @author Montse */ @...
asked by 28.09.2017 / 09:06
1
answer

What is "NaN" and why does it appear? [closed]

I was working with factorials, I put 1000! and I return NaN. Can you explain why NaN returns? (I think it could be for the bits)     
asked by 01.10.2017 / 06:50
1
answer

Android Action_DIAL error "No Activity found to handle Intent {act = android.intent.action.DIAL"

When making a call using Action_DIAL I get the following error: 09-28 16:47:31.610 2079-2079/? E/AndroidRuntime: FATAL EXCEPTION: main java.lang.IllegalStateException: Could not execute m...
asked by 28.09.2017 / 18:52
1
answer

Send arraylist from form jsp to servlet and show results in another jsp

I am starting to know the java web development and I am developing an exercise which I must fill a array from a form jsp , send it to a servlet to fill with the data of the form the array and show the results in a tabl...
asked by 12.09.2017 / 17:08
2
answers

Android studio does not find a dependency

android studio asks me for a class that is supposedly in a jar, but can not find it I have a class with the following imports: import com.google.gson.*; import com.sun.net.httpserver.*; import java.io.*; import java.net.*; import java.nio.char...
asked by 05.02.2018 / 16:13
1
answer

FCM with open app does not get notifications

Well as the title says, my test app with FCM does not get PUSH notifications when I have the app open, if I close the app they arrive normally, which seems strange to me since most people have problems with the app closed and not open, I leave m...
asked by 05.02.2018 / 15:26