Questions tagged as 'java'

1
answer

Sending Json via android GET

Problem in special characters ( keys, parentheses, etc. ) that contains a json that I'm sending via GET . The android generates the following log: > E/AndroidRuntime(1956): java.lang.IllegalArgumentException: Illegal > character in pa...
asked by 20.11.2014 / 12:56
1
answer

Loops do not hold values

Hello! I'm trying to develop a simple program that does an automatic accounting calculation, however, the condition within the for (while, do, while, if / else, any) does not keep its values. The repetition is executed 12 ~ 13 times and in all t...
asked by 23.10.2014 / 15:33
1
answer

How to implement generic data in this case?

I'm using ORMlite in my application and I want to implement a generic type in the following: public interface AdminDao extends Dao<T, Integer> { ... } where "T" would be generic. Error:    Can not solve symbol T     
asked by 30.10.2014 / 21:21
2
answers

Merge using Hibernate without deleting other Java data

In my Java application Hibernate for bank interaction I use a controller class created even by NetBeans, but the problem I have is the following when doing an edit in some field and only pass this value in the method that I'm going to call and m...
asked by 22.05.2015 / 14:07
1
answer

How to insert a String variable into a hql?

I need to make a query in the database and return only the values based on the variable, my code returns the list with all the data of the city field, I want to return only the cities based on the state that the user select first. The state retu...
asked by 22.10.2014 / 13:29
1
answer

problem with spacing and starting with number

I have an application where it has a screen with an EditText and a button. when I press the button I get the EditText String set in a Database column in the tables table, and then I create a new database table with the name that the user chose....
asked by 29.10.2014 / 19:50
1
answer

Why is it that when I insert 3 objects, only the last one appears to me?

I need to create a class carro . The program should contain a collection of ArrayList cars. Your program should allow you to add, delete, and query cars at ArrayList . I've implemented two programs one for main and o...
asked by 24.05.2015 / 10:47
1
answer

Problem when doing encode and decode of String

I would like to know why such methods do not behave in a way that:    long2str (str2long (String s)) == String s public long[] str2long(String s){ final byte[] authBytes = s.getBytes(StandardCharsets.UTF_8); final String...
asked by 02.12.2014 / 11:02
1
answer

How to select a particular row from the java listView

How do I get the row id of a listView? The idea is this: before grabbing the selected line, I'll work with all the lines I'm trying. aList = new ArrayList<HashMap<String,String>>(); for(int i=0;i<countries.length;i++){...
asked by 05.12.2014 / 03:29
1
answer

Problems updating the access token

I am authenticating to the Google Calendar API using Scribe, which once uses OAuth 2.0. Authentication completes successfully but I do not know how to store the access token in the database. I'm doing the following: /*Obter o API USER TOKEN e...
asked by 07.12.2014 / 02:34