Questions tagged as 'java'

3
answers

What is a View on Android?

Android visual components such as EditText , Button , and others have Listeners to handle events triggered by user actions. Thus, in the method corresponding to the event, it is always necessary to pass a View as a parame...
asked by 16.09.2017 / 01:57
3
answers

Why do I need to declare a type within Foreach?

Why in%% we need to always declare a variable. Example: for(Pessoa pessoa : pessoas) { //qualquer coisa } In other words, I want to know why you can not do this: Pessoa pessoa; for(pessoa : pessoas) { //qualquer co...
asked by 02.02.2016 / 01:18
1
answer

How do I know if Java is running on 32 or 64 bits?

Is there any command for me to use where it returns if my java is 32 or 64 bits in the Java language? Something like System.getProperty("java.version"); Something like that only comes back to me if Java is 32 or 64 bits.     
asked by 23.10.2015 / 18:32
1
answer

Why is it better to use char [] than String for passwords?

Using Swing, the getPassword() method of JPasswordField returns an array of char[] characters instead of returning String as getText() (which by the way is deprecated). Should I not use String to stor...
asked by 04.09.2017 / 19:26
1
answer

How to make DbUnit recognize the Postgresql POLYGON data type?

I have the following domain of type polygon in the database: CREATE DOMAIN "global".polygon AS pg_catalog.polygon; The following table that uses this domain: CREATE TABLE user.area_geom ( id_area_geom serial NOT NULL, polygon g...
asked by 13.12.2013 / 17:30
1
answer

Help with JavaFX form

Hello, I imagine that my question is simple but I have not found anything in the forums of life (probably because I do not use the correct terms in the search). I am creating a form for students in JavaFX generating fxml files with Scene Buil...
asked by 24.11.2015 / 03:01
1
answer

Is it worth developing JavaFX for Web, Mobile and Desktop?

I would like to know how JavaFX is going, if it is already consolidated, if it is still bet. I really liked the look and the "Write once, run everywhere" .     
asked by 20.05.2015 / 16:05
1
answer

Memory leak with Scala and processes (memory leak)

I have a reasonably complex system in Scala, with multiple threads and concurrent system calls. This system has a problem, because busy memory grows over time. From the image below, you can see the memory occupation of the machine over the co...
asked by 14.09.2014 / 17:31
2
answers

Convert float or double into real $

I have float = 11.6 want to convert into Brazilian currency R$ 11,60 , does anyone know how to do?     
asked by 22.04.2016 / 05:16
2
answers

How to avoid HTML injection and XSS in .JSP pages?

No PHP I have seen uses of htmlspecialchars and mysqli . But in Java is there any way to avoid XSS and HTML injection? I'd also like to know what would be the best (safest) way: Escaping the elements ( HTML , Java...
asked by 17.04.2015 / 18:42