Questions tagged as 'java'

2
answers

Problem with notification icon

I know there are several questions related to this. However, I did not find anything with my specific case. I'll explain ... I use the same code to display a notification for both notifications when the application is in the foreground and in...
asked by 27.11.2018 / 18:23
1
answer

What are pre-specified classes?

Reading the wikipedia publication on POJO (Plain Old Java Objects), I came across the term pre-specified classes. I understood very superficially that perhaps it is the classes of the specification, but it was not very clear. Could you explai...
asked by 21.11.2018 / 17:17
2
answers

Receive 2 parameters when entering a key parameter

I have a code that is related to 2 values, for example: 1253 (code), São Paulo (first value, in the case the state), and Osasco (second value, in this case, the city). I would like to know if there is any way in a list, or some kind of spe...
asked by 26.11.2016 / 20:14
1
answer

Interface that defines the generic signature of the methods to be implemented

I have three classes: Request Repository RepositoryMotorist RepositoryTravel All have the following methods with the exception of RepositorioTravel which does not have the "Change". The Object can refer to the Driver, Applicant, and T...
asked by 28.11.2016 / 18:22
1
answer

How to install a java application with MySQL database?

I'm developing a java desktop application, with java swing and MySQL database. But I need to install this application on multiple machines and I would like to know an easier way to do this, without having to install MySQL on all machines. Is...
asked by 23.11.2016 / 14:38
2
answers

Java, random numbers (without repetition)

I have a question about generating numbers without repeating. I can already generate random numbers from 1 to 8 which is my goal. The odd thing is that it generates repeated numbers (duplicates, triplicates or even more). In my program there...
asked by 17.04.2015 / 12:35
2
answers

Generate Boleto in Java

I stuck here looking at some libs for boleto bancário generation and it seems that the majority was abandoned. I would like to know if there is any updated, better or easy to customize. Libs parsed: Bopepo - link stella-ticket -...
asked by 15.05.2015 / 14:47
1
answer

Spring Rest - Use of various Services and Repositories

I have a question about the best way to implement some services with Spring Rest , but I could not find material for this case: Let's say I have a service for making a release ( LancamentoService ). This service launches, updates the balance...
asked by 17.10.2018 / 18:36
2
answers

When using StringBuilder and StringBuffer instead of concatenating with "+" operator in Java?

What are the benefits of concatenating a string using StringBuilder or StringBuffer instead of simply using the +     
asked by 01.11.2018 / 14:30
2
answers

Trying to understand Java print

Look at the code below; public class Dois { public static void main(String[] args) { int a = 3; int b = 4; System.out.print(" " + 7 + 2 + " "); } } The result is 72, but I thought it was for the result to...
asked by 14.10.2018 / 13:06