Questions tagged as 'java'

1
answer

How to convert String rest="1,2,3"; in an array of integers in JAVA?

good night! I have three String String cosa1 = request.getParameter("cosa1").toString(); -> SALIDAS con números aleatorios (**LOS NÚMEROS SON IDS DE PRODUCTOS**): 4,3 - 3,4,5 - 1,5,4 I want to pass that data to three INT fixes in...
asked by 28.09.2017 / 06:29
1
answer

builder.parse return null nice soft

I have an error on the line Document doc = builder.parse(is);// doc = null; Where at the moment of using the builder.parse it becomes null which makes the error arise and is captured by the catch (Exception ex) saying that the doc is null,...
asked by 18.09.2017 / 22:21
1
answer

Possible restriction in Eclipse? with Java [duplicated]

I have in my code several System.out.println () asking certain things and picking up in their corresponding variable what the user enters through the keyboard. The fact is that after several System.out.println (), Eclipse is as if you ignored...
asked by 03.09.2017 / 02:56
2
answers

How can I make a notification permanent?

What I want is to make that while the app is open the notification does not close, the notification has a button to expand that is to close it. To help me they have as an example the code of the notification: Intent notificationIntent = new...
asked by 21.09.2017 / 06:08
1
answer

each letter is in lower case and uppercase successively

String frase = "Que todo fluja y que nada influya"; int largo = 0; largo = frase.length(); for (int i = 1; i <= largo; i++) { if (i % largo == 0) { System.out.print(i.ToUpperCase()); } else { System.out.print(i.ToLowerCase()); }...
asked by 15.09.2017 / 01:38
1
answer

How to save an image in Database by URL

I have a database in Postgresql and using pgadmin4, there I have a table called products with 5 columns that contain the following types of data: Id, name, description, price, type. Now I want to add a column where I can save an image from its u...
asked by 15.09.2017 / 22:15
2
answers

Get data from an Override method

I want to obtain any value of an Override method that is inside another method to be able to return a data and be able to make a comparison. Within the method onResponse I want to obtain a data so that the method cargarDatos can...
asked by 17.09.2017 / 01:39
1
answer

Write Log with Logger - About the same file

I am creating a .log file in a specific path, but I have a problem, create a static class and every time I call the method of writing Log a new .log file is created, I need the log always to be on the same file . This is test code: import j...
asked by 29.08.2017 / 19:07
2
answers

how to show data in a JTextField when pressing a jbutton?

How can I get it printed in the JtexField that is txtCodigo when I press the button. private void jbGenerarActionPerformed(java.awt.event.ActionEvent evt) { Random1 ran = new Random1(); ran.llenarMatriz(); ran.imprimirMatriz()...
asked by 22.08.2017 / 21:09
1
answer

Load a JList with data from an array

Hi, I have my class Gestor with the following code: Class gestor { private final String cadena = "jdbc:sqlserver://localhost:1433;databaseName=Persona"; public final String usuario = "mi_usuario"; public final...
asked by 23.08.2017 / 23:15