Questions tagged as 'java'

1
answer

I'm playing the hangman game, and do I need to change a string for a char? but only one in a position

public class replace { public static void main(String[] args) { Scanner teclado = new Scanner(System.in); String sentence = "SISAS"; String auxWord = sentence; int g = sentence.length()*2; String remplazo = "_ "; while(r...
asked by 22.07.2016 / 02:32
1
answer

EditText with error message on Android

In the Google Material Design Design Guide , to show an error message when a field is incorrectly filled in, an error message is used below the component, I wonder how that text is established and what method it launches for its appearance, ho...
asked by 18.04.2016 / 18:00
1
answer

Android: Internal storage available

In order to execute a process that generates many files, I must ensure that I have the storage space available, based on estimates and calculations that give me an approximate figure of the space I must have to execute the process. Eventually...
asked by 23.04.2016 / 01:28
1
answer

list files / files on android

I would like to be able to open the files in a ListView of an activity  that contains my application. These files are being saved in another activity, and always with the same extension ( .prop for making it unique). What I do n...
asked by 15.04.2016 / 11:28
3
answers

Make invisible controls in JavaFX

Is there any way to hide controls in javaFX so that they do not take up space? I have seen that in android it is possible: control.setVisibility(View.GONE); What comes to mind is this: control.setVisible(false); control.setMinSize(0,0);...
asked by 15.04.2016 / 15:16
1
answer

Compatibility between versions and architecture in Java

When I create an application with a specific Java development kit, for example, the architecture of 64 bits and the version 8 >: Can this application work on any virtual machine ( JRE )? Or should it be the same architecture and versi...
asked by 27.03.2017 / 11:06
1
answer

How to check objects in a java cycle? [closed]

I wanted to know if it is possible to do a validation, for example, if I have 3 jtextfield with serial name ejm: jTextField1 jTextField2 jTextField3 (obviously more) and I want to see what they have stored, what can I do in a cycle? and in...
asked by 27.03.2017 / 18:29
2
answers

Error in Android 6.0 NSD service

NSD is a service used to discover other applications that run the same service in the local network. I'm trying to make the NSD sample work that it finds in the official Android site . The problem is that when selecting Search the applicat...
asked by 23.03.2017 / 21:51
2
answers

redirect to a servlet from an ajax passing values

Hello, what I want to do is redirect to a servlet from a jsp using ajax, since I have to send data that are not in the form, but should not be seen in the url colo are mascot, age and the token since the latter expires every so often, so it must...
asked by 14.12.2018 / 19:47
1
answer

Serialize and deserialize objects and properties in Java

I have a problem with the serialization and deserialization of objects in Java, and I think it's because I do not really understand how it works. My program consists of some spreadsheets as in Excel, but by console. I have a class "Book" and a c...
asked by 08.12.2018 / 18:57