Questions tagged as 'java'

2
answers

How to completely erase an ArrayList and a List

I would like to know how to completely destroy a ArrayList and List at run time. example: ArrayList<Elemento> e = new ArrayList();//Elemento e uma classe for (int i = 0; i<10;i++) { e.add(new Elemento()); e.g...
asked by 18.03.2016 / 16:24
1
answer

How to check if it's another day?

I'm making an application where a feature is available until a condition is reached, after that I have to disable the functionality and just enable it the other day. How do I know it's another day?     
asked by 24.06.2016 / 16:20
1
answer

Encryption and Encryption Android

I'm trying to learn how to use encryption to encrypt and decrypt messages. I have a class called Encripta that has the methods, the encryption works perfectly. My method to decipher encryption decrypt , returns the following l...
asked by 22.02.2016 / 20:09
2
answers

Is it possible to call by OnClick a new Activity TextView?

Hello, I'm trying to call a new activity through OnClick in a TextView , but running the application crashes. Here is the activity from which I am trying to pass: public class sdActivity extends AppCompatActivity { public stati...
asked by 18.10.2018 / 16:27
3
answers

Spring Data JPA does not recognize the SQL 'Limit' command?

I'm creating a REST API, using Spring Boot, which, using data from a table, displays random phrases. Giving a Google, I discovered that it is possible to generate random results through pure SQL: SELECT <coluna> FROM <tabela> OR...
asked by 31.10.2018 / 06:21
1
answer

Java - SQL Error Updating All Users

Good morning, I have the following problem my updateUsuario SQL is updating all how do I just update the User that you have accessed? public class Acessar { public static Connection con = dao.ConectarDB.getConexao(); public static String...
asked by 02.12.2015 / 11:43
1
answer

Problem with input java

My program inputs are overwriting. He ignores the first one and already launches the second straight. System.out.println("Digite o nome do passageiro"); String nome = in.nextLine(); System.out.println("Digite o numero do ticket do passageiro")...
asked by 19.11.2015 / 21:29
1
answer

Hibernate, force table name in low case

I am using Hibernate 5.2.1.Finally as implementation to handle MySQL database. The problem is that tables are being generated with the first letter in high box, I would force to be all in the box via file of persistence. Currently my file is thi...
asked by 16.08.2016 / 17:58
1
answer

Overflow by multiplying two integers in BigInteger

I'm starting Java studies and I have one task: to generate two random integers and store their multiplication. For this, I tried to use long and BigInteger . But the result of this multiplication is almost always negative. Why? in...
asked by 29.04.2016 / 18:37
1
answer

Conversion of Java code to C #

I would like a help to convert the following code in Java to C #. public static long convertStringToBitboard(String Binary) { if (Binary.charAt(0)=='0') { return Long.parseLong(Binary, 2); } else { return Lon...
asked by 19.04.2018 / 23:50