Questions tagged as 'java'

2
answers

How to solve the SLF4J fault in maven?

Problem with Maven install: When I run in eclipse Run As > Maven install I always get this message: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation...
asked by 18.02.2014 / 19:59
2
answers

Project Maven + Spring MVC + JSP, how to share view files?

I'm trying to fit a file structure to get a big project, an ERP to be more accurate. Today, there is a good deal of it made in PHP in a messy way. Let's take Java Web (Maven + Spring MVC + JSP + Hibernate) to create the next modules and in the f...
asked by 03.07.2014 / 18:37
2
answers

What is the advantage of using JUnit to test methods of a class?

I've created an application that basically is a class that tests whether the methods of another class are returning the expected values. My teacher asked me to rephrase this class as a JUnit test case. I did as he asked, but in the end I get the...
asked by 05.04.2016 / 15:12
2
answers

Doubt with inheritance in Java method

I have the interface below public interface BaseRelatorioDTO extends Serializable { public BaseFiltroDTO getFiltro(); public List<? extends BaseRespostasDTO> getRespostas(); } And I would like to create the method public...
asked by 28.03.2014 / 00:08
2
answers

How to get the code of a General Unicode Category?

Java has the method Character.getType(char) to get the General Category Unicode for a character, however the return value is int - corresponding to a constant defined in the class itself Character (ex .: public static...
asked by 02.05.2014 / 17:27
2
answers

How to access static jTextField created with swing?

So, guys, I have a jTextField that works normally, but when I put it as static setText does not work anymore, and I need it static because I do the same for a function, I did it without swing and it worked out I do not kn...
asked by 14.03.2014 / 13:44
1
answer

Method overload (double and float)

Having 2 methods with the same name, but the types are different ( double and float ), the amount of parameter is the same, which one will Java recognize first and why?     
asked by 12.05.2016 / 22:30
1
answer

Using the Consumer Interface

What is the advantage of using the Consummer interface of java in this way? Example: UsuarioConsummer have a class that implements the interface%% Consummer and calls their method acept % following example: public class UsuarioCo...
asked by 27.03.2016 / 04:13
1
answer

Call graphical interface in java

My doubt is simple, I think. I need to call this interface CadastroGUI d = new CadastroGUI() ; which I already have ready, but I want the fields already appear filled, after all, it is a query command by CPF where I want to return the clie...
asked by 01.12.2015 / 02:00
1
answer

How to resolve the NetworkOnMainThreadException error?

I'm having an error in passing the HTTP Client from JSON to Android. Follow my code in JSON: // constructor public void JSONParser() {} public JSONObject getJSONFromUrl(String url) { // Making HTTP request try...
asked by 18.06.2015 / 14:27