Questions tagged as 'java'

1
answer

Incompatible types boolean can not be converted to String

What happens is that I'm making a library application and when I click on the Save button, I get this error:    Incompatible types boolean can not be converted to String here is the code: Save button: Connection con=null; try...
asked by 07.07.2018 / 00:56
1
answer

When we use the comparable or comparator interfaces, why do we have to make it compatible with the equals method and how to do it?

Apparently it works well for me, but in the information I've read, I recommend that the compareTo() method defined by the Comparable() interface be compatible with the equals() method. This means that: objeto1.compareTo(...
asked by 09.06.2018 / 00:10
3
answers

Problem with Android Studio on windows 10

I have a problem, I installed Android Studio on my PC with windows 10 64 bits, but when I started to make a project I realized that my components were not shown (buttons, texts etc in the preview, I do not know how to fix this problem I hope you...
asked by 13.06.2018 / 08:54
1
answer

POI reading decimals

I have an excel *.xlsx with a cell of type Número , the value I have in the excel is 0,0794497914814776 but the value returned by the method celda.getNumericCellValue() is: 0,07944979148147759987 I have tried...
asked by 07.06.2018 / 12:17
2
answers

Differences between declaring imports of classes and packages, or classes without importing?

As I understand it, the difference between importing specific classes or their packages is in the compile time , lower in the first case, although this would not affect the application's performance , right? Now, what is the differe...
asked by 05.06.2018 / 00:15
2
answers

Store data temporarily on android

I have created a shopping cart in Android, the user has the option to see a product in a ListView, then clicking on it goes to an activity where he sees the product detail and has the option to confirm the purchase, until now all right but I wan...
asked by 26.10.2018 / 23:25
1
answer

Error showing libGDX animation

When drawing the animation, just grab the first texture, do not go through the array and I do not know why ... Here I leave the fragment of the render, when I call the animation if(juegoAcabado){ // Si hi ha hagut col·lisió:...
asked by 31.05.2018 / 12:33
1
answer

Pass parameter to Controller in Spring Boot

I have a page with a series of images inserted in cells. I have in mind to make that according to which image you click, a common page loads in which within the controller it determines where it comes from. So that according to what image comes,...
asked by 30.05.2018 / 19:11
2
answers

Send string by Post from client to Java server Jersey

I try to send 2 string from my java client to my java server using Jersey, the client and the server respond correctly (code 200),    Server Code @POST @Path("eliminar") @Consumes({ MediaType.MULTIPART_FORM_DATA, ("text/plain") }) @Produc...
asked by 29.04.2018 / 23:39
1
answer

Doubt between try-catch and throws

When I write .start () in the code to indicate that the process starts, the Eclipse program gives me an error and gives me two options: wrap the .start () in a try-catch block or add a throws to the class. What is the difference between using a...
asked by 28.05.2018 / 01:02