Questions tagged as 'java'

2
answers

Display data in a ListView from a database

I am decoding the response in JSON , and I want to show that data in ListView , how can I do this task? . I leave my progress. public void onResponse(String response) { System.out.println("INFORMACIÓN OBTENIDA DE LA...
asked by 16.01.2017 / 16:19
2
answers

NullPointerException when updating in JPA

I have the following code to update the values of an object that are displayed in a table: public class AgendaJPADAOImpl implements AgendaJPADAO, Serializable { EntityManagerFactory emf = Persistence.createEntityManagerFactory("AGENDAJPAPU");...
asked by 25.10.2016 / 11:56
2
answers

How can I create a folder in the internal memory in Android?

I can not find the way to create a folder on android. With java it is different than creating it in Windows. How can I create a folder in the internal memory of a java phone?     
asked by 11.02.2017 / 22:18
1
answer

Return value of a vector in java

Good, it may seem like a silly question but I'm doing a method that is passed by an integer parameter and when it matches the position of a vector, I return the value that is in that position. What would be the correct syntax? ? Thanks in advanc...
asked by 22.10.2016 / 10:26
5
answers

Add exception Try and Catch

Create a program that requests a phrase by keyboard and displays on the screen the position of the character that has a higher ASCII value. The program must validate that the phrase written by the user does not have any of the following symbols:...
asked by 14.10.2016 / 00:08
2
answers

I get an error Exception in thread "main" java.lang.NullPointerException

I get the following error in console: Puede entrar un coche Coche devuelto Puede entrar un coche Coche devuelto Puede entrar un coche    Exception in thread "main" java.lang.NullPointerException         at Garaje.aceptarCoche (Garaje.java:2...
asked by 24.10.2016 / 08:52
1
answer

Change Extends Activity by Extends Fragment without affecting The result? (Android app)

I'm trying to merge two projects android. The first is basically an Application that consists of a single Class: MainActivity.java As I put below: (It's an example of how to upload an image of the Micro SD server yet) @SuppressL...
asked by 16.07.2016 / 15:43
2
answers

2013-07-29 06: 35: 40: 622 GMT to 2013/07/29 with 2013/07/29 Date type and not String

I have that date format 2013-07-29 06:35:40:622 GMT and I want this to get this format 2013/07/29, I have seen that with format of SimpleDateFormat can but returns me% String and I want 2013/07/29 in Date...
asked by 26.10.2016 / 13:47
2
answers

Subtract days correctly

Java offers me different variables to subtract days from a date such as: DAY_OF_MONTH DAY_OF_WEEK DAY_OF_WEEK_IN_MONTH DAY_OF_YEAR I have a method in which you subtracted days or months as I wish to a date, b...
asked by 10.08.2017 / 04:02
3
answers

Autoincrement when adding record in Android Realm

Really I see that there is nothing like Mysql to be able to assign auto-increase of an index. How could something similar be done when entering new records. Structure User extended RealmObject public class User extends RealmOb...
asked by 02.09.2016 / 08:35