Questions tagged as 'java'

1
answer

What is Maven for?

I often find large projects that have the pom.xml file, but I never understood the utility of it, I just discovered that it is something related to maven. Anyway: What is Maven for? What is the pom.xml file for?
asked by 20.04.2015 / 05:19
3
answers

Is it correct to say which interface solves the problem of multiple inheritance in Java?

It is known that Java does not support multiple inheritance . Is it correct to say that the interface concept solves the problem of multiple inheritance in Java? If so, why?     
asked by 27.09.2015 / 05:49
3
answers

How to resolve the error - The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

I'm using Eclipse Mars.1 for Web development, I got this error by including a file JSP , The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path . I also have Tomcat 8 running on the PC.     
asked by 27.10.2015 / 23:01
1
answer

Detect collision between corners of objects

I'm writing a game based on the breakout , but I can not think of a way to detect the collision between the corner of the ball area and the paddle, to be able to reverse the horizontal direction of the ball. In my class Ball , I have a...
asked by 09.05.2017 / 01:29
3
answers

JSON string conversion for Java object

I'm trying to convert a JSON string to a Java object used by Gson. This is the json I get from webservice: {"concurso": { "numero":1499, "data_sorteio":"01\/06\/2013", "dezenas":[8,22,26,33,37,54] } } Here...
asked by 17.02.2014 / 01:05
1
answer

What is the 'And' alternative in Portuguese for variable names and methods?

A question that always teases me when I'm in a Java project in which we use terms in Portuguese is to deal with method names or variables that represent somehow two things and need to mention both in the method / variable name. In English, and i...
asked by 17.05.2018 / 15:15
1
answer

What is the cardinality between a request and the services included in it?

I have class Solicitacao and class Servicos . After insertion into the database I want to retrieve in a query all the services associated with that request. For example, on one screen I insert the request and several services. Wh...
asked by 14.08.2015 / 16:18
6
answers

Why can not I define an interface with static methods?

I would like to force some of my classes to be implemented in Singleton, but I came across the following situation. interface ICharacterSingleton{ static Characters getInstancia(); } public static class Zero extends Characters implements...
asked by 18.07.2014 / 00:07
4
answers

Specific use of try-catch

I'm studying Hibernate and with it came some doubts that have come to me before but did not question in depth. public void salvar(Usuario usuario){ Session sessao = null; Transaction transacao = null; try{ sessao = Hiberna...
asked by 15.01.2016 / 14:22
1
answer

Android Studio does not open new project (becomes transpatent)

When I installed and tried to open it for the first time, it worked perfectly, however, when I tried to open it again later, when I click on "Start a new Android Studio project", the window opens but it stays transparent forever (as you can see...
asked by 17.01.2016 / 19:09