Questions tagged as 'java'

3
answers

Is memory freed by assigning null?

I have this code clase MiObjeto = new clase("Nombre1"); MiObjeto = null; Did I free space in Name1 memory by assigning it the null value?     
asked by 30.01.2018 / 19:01
2
answers

After an UPDATE, I execute a select but the data is not updated

I'm working JPA, I run the following update: public int EditarUsuario(UserSys us) { EntityManager em = getEntityManager(); em.getTransaction().begin(); try { Query q = em.createNativeQuery("UPDATE 'user_sys' "...
asked by 25.04.2016 / 23:14
1
answer

change asterisks by points in jpasswordfield java

The issue is that I do not want them to come out I want it to come out like that, with points How do I do it? use netbeans     
asked by 28.02.2018 / 03:52
5
answers

How to show current time in java?

long tMinTotal = System.currentTimeMillis() / (60 * 1000); int tMinCurrent = (int) (tMinTotal % (24 * 60)); hours = tMinCurrent / 60; minutes = tMinCurrent % 60; I know this is how it is done but I do not understand what the second line does....
asked by 29.10.2018 / 17:09
1
answer

How to create a personalized anchored shortcut?

My question or current problem is that I want to be able to create a direct access on the screen (currently as I could see in the documentation is called anchored access) that allows the user to activate a voice recorder by simply stepping on...
asked by 31.10.2018 / 00:14
2
answers

Java JDBC error statement [closed]

I paste the code and consult from it, since I pass the field of the database from a combo and the value, the field does not take it, the value does. What happens? public ObservableList<Categoria> buscarCategoriaPorSeleccion( String c...
asked by 22.03.2017 / 19:59
2
answers

Create a LIFO stack system with discard when full in Java

I want to design a system, establishing a data warehouse method, stack style, but with the peculiarity that when the maximum is reached (3) the first element of the stack is eliminated, thus only keeping the last values. General design:...
asked by 03.07.2016 / 23:02
3
answers

Go from java.util.Date to java.time.LocalDate?

I have a date on Date and I want to move it to LocalDate: Date fechaAntigua = new Date(); LocalDate fechaNueva = new LocalDate(); fechaNueva = fechaAntigua ...?     
asked by 13.06.2016 / 15:18
3
answers

Android How to implement a navigation drawer menu in all the activities?

Good morning. I have a Navigation Drawer ready, but what I want to do is to be able to use it in any of my activities. How could I implement this? Thank you in advance.     
asked by 13.09.2016 / 18:21
3
answers

Find multiples of 5 or 3 - Project Euler

I'm trying to make a problem of this page , and it came out of the following way: public static int metodo() { int total = 0; for (int i=1; i<1000; ++i) { if (i%3 == 0 || i%5 == 0) { total += i; } };...
asked by 06.08.2016 / 03:33