Questions tagged as 'java'

1
answer

Problem with the "encoding": Characters correctly stored in MySQL appear "rare" in Java

Dear, I have a small problem with a Java application that I am writing. It is an application that connects via JDBC to MySQL. When saving the records, the characters are saved correctly (if I write "Mexico" in a JText box and send it to the d...
asked by 30.04.2016 / 18:02
1
answer

How to load data in Spinner Determine how they are displayed

I have a problem with the view of the spinners in Android, the list of data that I load in the spinner is correctly ordered from the AZ but when selecting the spinner it is shown from the Z and I have to scroll the scroll view towards up. Cou...
asked by 11.05.2016 / 21:06
3
answers

Problem when using Scanner # nextLine (); inside a for

The question is that I want to enter a String that can contain space (ex: United States) and for that reason I use the nextLine, but also in that same method I enter data type Int. The problem is that being inside a for in the second entry, it g...
asked by 20.01.2016 / 02:32
2
answers

Initialize Java arrays

Why does not the following work to initialize an array? public class TestArrays { private static int[] numbers; public static void main(String[] args) { numbers = {1,2,3}; //error } } //class but, yes in this way? pu...
asked by 07.03.2018 / 13:08
3
answers

Start an application programmed in java for android in the startup

I have rewritten my question and this time I will be more specific. My problem is that I want to start my application every time I start my phone. For this I have a java file called bootreceiver.java that I have the following: package m...
asked by 02.06.2017 / 17:32
2
answers

Try - Catch and Variable not initialized

I just learned the basic structure of the Try-Catch and I made a small code to test it, but it gives me an uninitialized variable error. Can someone instruct me a little about this? I leave the code: public static void main(String[] args) {...
asked by 22.03.2018 / 05:45
3
answers

Can not change a character with .charAt ()?

I want to make a java program to replace spaces with % 20 . I was thinking of making a loop and when I find a " " I replace the character with the three characters. However I have a problem with .charAt() . In effect it seems...
asked by 30.04.2018 / 16:37
3
answers

Encrypt RSA in C # decrypt in java

I am building two applications one in C# and one in Java, which will use RSA as part of the encryption and decryption that should be handled. When I encrypt with java and decrypt in c# works perfect, the problem is when I...
asked by 04.09.2016 / 03:40
1
answer

Compile and assign libraries in DEBUG mode in Android Java

I use the following libraries only if they are available in modo debug debugCompile 'com.github.brianPlummer:tinydancer:0.0.9' debugCompile 'com.facebook.stetho:stetho:1.4.1' debugCompile 'com.uphyca:stetho_realm:2.0.0' In MainAct...
asked by 29.11.2016 / 14:14
1
answer

Structure on Threads in Java Swing

I make my first consultation available and in advance I appreciate the future answers. To start I have a form that contains 2 jcombobox : jcbSerie and jcbPartido . The form integrates Runnable() In the form varia...
asked by 24.05.2018 / 16:37