Questions tagged as 'string'

1
answer

Find parts that are equal of 2 Strings in java

I would like to know if there is any way to compare 2 Strings in Java in such a way that they search not if they are equal, but if they do have equal parts and concatenate them without repeating the common parts. Example: Dice Strings as:...
asked by 05.12.2017 / 23:15
1
answer

How to store string type data in a java array

Good People I need help, I am working on a project with forms, the program is already done, it is about a questionnaire in which it presents a question (jlabel) and the user chooses one of the options shown by (radiobutton), until the system hit...
asked by 13.08.2017 / 23:44
1
answer

Help with class instance that contains array of string

Hi, I have a class with an array as a variable: public string history; public string[] answers; public StoryNode[] nextNode; public bool isFinal = false; I want to create a reference in another class, as I must fill in the a...
asked by 09.10.2017 / 14:27
2
answers

Help to store this data

I am interested in saving two types of data, String and int. I have to store numbers so that: int: 1/ String:"Uno" ... int: 89/ String:"Ochenta y nueve" I know that in other languages there are tuples, but I do not know how to store it in j...
asked by 26.05.2017 / 13:17
1
answer

fopen does not work and SIGSEGV sends me in debug and another error in normal compilation

Basically I want to make a program that "divides" the routes in which the file is that I am specifying, that I already achieve, however I also want to access this file with everything and the route so I use fopen and place as variable the string...
asked by 28.05.2017 / 10:34
1
answer

Remove spaces when pasting into Excel from DataGridView

I want to paste the contents of a DataGridView in Excel. However, the content of a column, because each row has extra blanks at the end of the string, makes this column much longer than the content. Whereas I have this code to select what I w...
asked by 14.06.2017 / 16:20
1
answer

Encode base64 Java image

I'm trying to convert an image to a String base64 (I need to send it via POST ) and I can not get it. I use the following instruction: String imgDS = DatatypeConverter.printBase64Binary(Files.readAllBytes(Paths.get(".\imagen.png")));...
asked by 20.04.2017 / 18:18
3
answers

Separate a json string, saving in variables with their respective value

This is the result of consulting a webservice {"Nombre":"Juan","Apellido":"Luna","Edad":26,"FechaNacimiento":"09/03/1990 12:00:00 AM"} I need some way to separate the values and save them with the name of the variable and the value that cor...
asked by 08.03.2017 / 19:45
1
answer

Error java.lang.NumberFormatException

I have a problem with this program, it works so that when entering a text like "234 + 312" convert the strings into numbers and do the corresponding operation, but I get an error package Pruebas; import java.util.Scanner; public class prueba {...
asked by 04.11.2018 / 06:33
1
answer

Verify if there are whole numbers in a chain?

I have made this code: public static void main (String []args){ Lexico lex = new Lexico(); String cadena = JOptionPane.showInputDialog("Ingrese la cadena: "); System.out.println(lex.ingresarCadena(cadena)); } String[] Ec...
asked by 24.10.2018 / 16:51