Questions tagged as 'java'

2
answers

set bookmark in google maps android (API V2)

I have these two classes that call my map, and my activity that contains it, the issue is that I need to pass on the parent activity, the coordinates for the child activity, but I do not know how to do it, if I do a new method that go to the fra...
asked by 16.05.2018 / 06:49
1
answer

Problem when encrypting and decrypting in client and server

I want to send a message (in this case simply "123456") encrypted from the client to the server so that the latter can decipher it. All this I do with a symmetric key that both have. The objective with this would be in a basic way to know that t...
asked by 22.05.2018 / 17:41
2
answers

Error in reading data type INT with JAVA Scanner [Resolved]

I have a problem reading data int with 'nextInt' and I do not know what it can be. I leave the method that is giving me the error; If something is missing or you want the complete code, you can ask me. Could you tell me what it can be? sta...
asked by 23.05.2018 / 10:06
2
answers

Increment 1 to each item in a list and save it in the database

The problem is this: I have a table in the database with a field position which receives integer values, then I load a list with the data of my table, now I need that when inserting a new record in the position 1 and if position 1 already exists...
asked by 10.05.2018 / 22:24
1
answer

Doubts to check an array in JUnit

I have an Array class with two constructors and some methods like initialize or invert, the problem is that I have tried several things but I do not know how to compare the method with the expected result. I tried this: package test;...
asked by 11.05.2018 / 03:26
2
answers

Find second maximum value matrix

I have a matrix and I find the maximum number but I would like to know how I can find the second maximum. I will leave the methods I have ... Thank you public double maximMat(double[][] mat) { double max=0; for (int i = 0; i < mat.lengt...
asked by 10.05.2018 / 03:50
2
answers

I'm doing a program to encrypt and decrypt files on android, could someone help me?

I can encrypt small files of any type (MP4, MP3, JPG, PDF, DOCX), but when they are large it gives me an error of the type:    "Throwing OutOfMemoryError" Failed to allocate to 150835256 byte allocation with 25165824 free bytes and 121MB unti...
asked by 18.05.2018 / 17:51
1
answer

Query HAVING SUM () in HQL Query

I would like to use the following query that you make in MySQL: SELECT * FROM bdcsd.insumo GROUP BY bdcsd.insumo.Nombre_Insumo HAVING SUM(bdcsd.insumo.Stock_Actual) <= bdcsd.insumo.PDP; In a java class using Hibernate's HQL Query method...
asked by 19.07.2018 / 17:48
1
answer

Create text file: error java.lang.IllegalArgumentException: contains a path separator "

I need to create a .txt file in a specific path that I created and write data that is in my BD inside that file, the way I found is OutputStreamWriter, but it sends me an error that says:    "java.lang.IllegalArgumentException: sample / examp...
asked by 15.10.2018 / 18:39
1
answer

When I enter the amount of albums sold by different artists, how can I detect the person who sold the most?

package cantanteFamoso; import java.util.ArrayList; import java.util.Scanner; public class ListaCantantesFamosos extends cantanteFamoso { public ListaCantantesFamosos(String nombre, String pais) { super(nombre, pais, discosVendi...
asked by 30.04.2018 / 17:17