Questions tagged as 'java'

3
answers

Doubt on Inheritance

I have the following case: Avo.java: public class Avo { public String quemEuSou(){ return this.getClass().getName(); } } Mae.java: public class Mae extends Avo{ @Override public String quemEuSou() {...
asked by 17.02.2016 / 19:21
1
answer

What is a DTO?

I'm messing around with Java a short time and I always hear the DTO expression related to pulling something out of a bank, but I've never quite understood what it's all about. Is it just a name to reference the process of pulling information...
asked by 03.09.2014 / 17:31
2
answers

Error trying to run Eclipse: Java was started but return exit code = 13

After having HD changed, I downloaded and tried to run the eclipse and it returned the error: Java was started but return exit code =13 What is causing this error?
asked by 05.11.2014 / 00:11
2
answers

___ ___ erkimt With the departure of ViewScoped the new specification of the JSF, which scope to use now in my managed beans that used using JSF 2.2? ______ qstntxt ___

I have a big question now with the appearance of JSF 2.2: What do I do with my views and my old managed beans? How do I now (what scope to use) since I can not use more view scoped in a view that needs to keep some objects in memory between ajax requests?

    
______ azszpr95 ___

According to: link

La says that the @ViewScoped annotation in the javax.faces.bean.ViewScoped package should become deprecated, given the creation of the @ViewScoped annotation of the javax.faces.view.ViewScoped package.

This happens, considering the adoption of an extension of the CDI, using the second annotation. If you do not use the CDI, this annotation will not work.

    
______ azszpr96 ___

You can and should use the CDI ViewScoped: javax.faces.view.ViewScoped, however of course, you need to use CDI beans.

What happens is that JSF ViewScoped does not work with CDI beans, and JSF is taking the course where CDI beans will override JSF Managed Beans. So they are making arrangements for the entire javax.faces.bean package to become deprecated in the future.

More information here at this link: link

    
___

I have a big question now with the appearance of JSF 2.2: What do I do with my views and my old managed beans? How do I now (what scope to use) since I can not use more view scoped in a view that needs to keep some objects in memory between ajax...
asked by 11.12.2013 / 19:18
1
answer

Check whether a path is relative or absolute

I would like to know if there is any Java function that checks whether the string is a relative path or not: Ex:   String caminho = funcao("\pasta\arquivo.xml") // retorna true que é um caminho relativo String caminho2 = funcao("c:\pasta\...
asked by 21.01.2014 / 14:08
4
answers

Should I initialize strings (or objects in general) with null?

I have noticed that a common practice among programmers is to initialize an attribute of a class with null . Is this a good practice or not? Is there any difference between initializing with null or not initializing "at all"? Exampl...
asked by 15.01.2016 / 14:28
3
answers

How to create a filter from the words / phrases of interest to filter a certain vacancy from a "List"?

In my example I have two classes that are SetorInteresse and Vaga , below follows the structure of the two: Sector Class Interests: public class SetorInteresse { private List<String> setores; public SetorInteres...
asked by 12.09.2016 / 03:09
2
answers

Future of java in chrome - possible complications

According to this news from # I have many web programs that require java running, I wonder if it's possible even after chrome disables NPAPI, still make java applications work? Excerpt from the news    For the end user, the main change...
asked by 20.04.2015 / 15:35
1
answer

What makes Kotlin a faster language than Java?

I've read in some articles that Kotlin is faster than Java, but none of them exemplifies why. [...] As fast as Java ". Kotlin - Evolve your Java code (TDC-2016) Alex Magalhaes [...] Kotlin must compile quickly, coexist with Java and...
asked by 08.09.2017 / 14:13
1
answer

Java Interface 8

Java 8 allows you to implement methods in the interface itself. So I would like to know what an abstract class can do that an interface can not. Source: link     
asked by 01.10.2015 / 22:25