Questions tagged as 'java'

3
answers

Interface or Abstract?

I've read a lot of content on this topic until I get to this example: public interface Funcionario{ public void trabalha(); public void recebe(double salario); } public abstract class Geek implements Funcionario{...
asked by 08.10.2014 / 21:27
2
answers

How do I schedule releases for continuous integration with Jenkins?

I'm using the Jenkins tool for seamless integration, it's working normally. I tried to leave it scheduled to build every 3 hours, so I checked the "Build periodically" checkbox and left it as follows: * 3 * * * Letting it in this way genera...
asked by 08.01.2014 / 10:39
1
answer

How does digital certificate authentication work?

I want to authenticate via digital certificate in a web application. I have already read the data from my digital certificate that is connected to my machine. The question is: "How do I authenticate?". Should I get the public key...
asked by 12.12.2016 / 19:07
1
answer

Validate attribute of type array in an annotation

When using the Ordem annotation you would like to make your valores attribute mandatory. By binding I want to say that the value of your attribute should not accept an empty array, or an array with an empty String. Is it possible to p...
asked by 07.06.2015 / 02:57
3
answers

Contains in Java, how to fetch a text in an ArrayList?

In C # there is the method contains of System.Linq that searches for text in a list, did the tests in Java and did not find a similar form even knowing that in Java 8 has expression, is there any way to do this with expression in Java?...
asked by 25.01.2017 / 14:23
3
answers

What is the difference between return and break in a switch case?

In some situations you need to practice switch case for optimization and improvement of code. I have an application developed for Android using Java, which in the case is used in both situations. Below I have an example using return...
asked by 05.01.2017 / 17:56
2
answers

Priority in progressdialog

Is it possible to prioritize progressdialog vs. Thread ? In my app, after clicking a button, I need to freeze progressdialog for 2 seconds. After that, I generate a query to my webservice , and as soon as I return the d...
asked by 26.02.2015 / 18:41
3
answers

Splash Screen loading with application

My application, when starting, does the first search in the database. Since I use Hibernate , this first connection is a bit more time consuming because it assembles all the database mapping. I'm thinking of adding a Splash Screen at the b...
asked by 24.07.2015 / 14:22
2
answers

URL Redirection With Spring MVC

I want to put in my project access to a page in a views subdirectory. Type views/pessoa/criar.jsp . How can I write a controller that accesses this page? I'm using Spring MVC 3 and InternalResourceViewResolver . I tried...
asked by 08.11.2014 / 23:59
1
answer

Difference between printf and format

Is there any difference between using printf and format ? Example 01: float nota = 5.3f System.out.printf ("Sua nota: %.2f", nota) Example 02: float nota = 5.3f System.out.format ("Sua nota: %.2f", nota)     
asked by 19.04.2017 / 22:51