Questions tagged as 'java'

2
answers

File reading

I am trying to make a program that reads a text file, it must be printed on screen in some defined fields, I must configure a button of first, next, previous and last. I'm with the next but I try to do it through a cycle as if it were an array b...
asked by 21.11.2018 / 21:05
2
answers

Delete user by ID

I have the following link <div class="col-md-8"> <a href="borrarUsuario/${session.userData.id}">Borrar Usuario</a> </div> This is the controller method that clears @RequestMapping(value="/borrarUsuario/{id}",me...
asked by 21.11.2018 / 08:00
1
answer

finalize a function in Android Studio

I have a problem with a function. In fact what I do is read the SMS inbox and when you enter a new text message it is executed. The problem comes from the second time I call the same function because it is not updated but it reads the same messa...
asked by 21.11.2018 / 13:06
1
answer

Use of the reserved word assert on android [duplicated]

I have a question and it is that the IDE AndroidStudio marks some warning when the line of code can produce a null result, in that case it suggests a assert variable != null the question is whether it would have the same meaning as sayi...
asked by 18.11.2018 / 05:19
1
answer

Multiple Sessions in Java Web?

Good morning, have all of you. My question is this, I have a coupon printing system for raffles, made in NetBeans (Servlets), this system has the option to log in and enter, until there everything works fine. The problem begins when registering...
asked by 18.11.2018 / 17:07
1
answer

Modify a file using android studio

I need to modify the file that I show you below: I have tried several ways but I always get an error. I leave the following code to know what I'm failing. Thank you very much. try{ FileOutputStream archivo= new FileOutputStream("a...
asked by 19.11.2018 / 14:02
1
answer

Array required but arraylist int [] found

I do not understand the reason for this error: // Método para obtener las propiedades del jugador public ArrayList<int[]> obtenerPropiedadesJugador (){ // MIRAR int i = 0; boolean pertenece = false; ArrayList &l...
asked by 11.11.2018 / 17:16
1
answer

How to add restrictions to object of type "Criteria" when the criterion attribute is of an external class?

I have the following dilemma to generate a list of all the credentials that belong to a specific physical host. Class FisicHost @Entity @Transactional public class FisicHost { @Id @GeneratedValue(strategy = GenerationType.IDENTIT...
asked by 06.11.2018 / 20:50
1
answer

Text '03 -03-1996 'could not be parsed at index 0

I see this error when I try to save an EditText type date in a variable type local date (making the appropriate conversion) error line in bold. Code public void metodo_editar2(View view) { //se añade el contacto nombre=campo1.ge...
asked by 13.11.2018 / 12:56
2
answers

Sum of two different vectors

Help with this code, I need to know what the logical error is. package vectores; import java.util.*; public class Vector { private ArrayList<Integer> vector; private int numElementos; public Vector() { vector=new...
asked by 09.11.2018 / 01:15