Questions tagged as 'java'

1
answer

Split Error over IP String

Could someone tell me why this method with split() does not return the array correctly? Thanks My intention is to send a String to the method that would be an ip and that the method returns that IP in an array of Strings. public clas...
asked by 19.12.2018 / 01:32
1
answer

Can you overwrite System.out.println ("") ;?

I am in a project written in Java somewhat advanced where I have used a lot of messages by console. I would not like to remove them, but not to print them if I do not define it that way in any configuration option of the program (For example, ru...
asked by 31.07.2017 / 16:24
1
answer

How can I return the value of a method that is within another method

I am making a request with Okhttp and in the onResponse() method I am storing in variable myResponse the result of that request, my question is, how can I make the method peticion() return the value of the Variable...
asked by 27.04.2018 / 12:41
3
answers

Using JSON in PHP

I am using json-simple from Java to receive and request data in JSON format from PHP. But I do not give with the way to do the correct code from PHP to send and receive and in Java to receive. JAVA code to send and receive import org.js...
asked by 02.02.2016 / 23:40
2
answers

Can I delete these files without anything happening?

I have an application on Android that is very busy and 90% of the total is because of 3 files that I do not know if they can be deleted or what would happen if I erase them. The first one is fileSnapShots.bin, located in .gradle / 2.10 / task...
asked by 11.09.2016 / 16:48
4
answers

Help in solving algorithm showing repeating figures - Java

Dear community, I would like support in solving this algorithm: Enter any natural number, to show the figures that are repeated and the number of times they are repeated. Example: Ingrese un número natural cualquiera: 471757347 El numero 4:...
asked by 17.06.2016 / 21:15
2
answers

Solve error has leaked IntentReceiver on Android

I have an extended class of BroadcastReceiver in MainActivity.java I launch the listener registerReceiver( new ConnectivityChangeReceiver(), new IntentFilter( ConnectivityManager.CONNECTIVITY_ACTION));...
asked by 29.06.2016 / 11:38
3
answers

String Separator in Java

I am generating a Jtable that has some information, however there is a field that obtains several data and they are stored to the side inside the same cell, currently separated by a comma (,) but my problem is that I need no last comma. For...
asked by 22.10.2018 / 20:08
2
answers

Sort Array using an int variable from another class

I am currently new to this java and I have a question about sorting arrays . I have this code in a previously created class. public class Orden { int value; public Orden(){} public Orden(int value){ this.value= va...
asked by 06.04.2018 / 07:17
1
answer

When is it better to use LinkedList and when ArrayList.?

I have problems to differentiate when to use one or the other .. For example, in an agenda in which you add contacts and delete them I think it would be LinkedList. I would like an answer to easily understand when to use one or the other. A l...
asked by 13.06.2018 / 20:42