Questions tagged as 'java'

2
answers

"Refresh" of the fragment with listview

I have a Fragment that, clicked on a RadioButton , a route is calculated, after this route calculation, a ListView is displayed with the results. By clicking on the other radiobutton option, the routes are calculated again...
asked by 16.09.2016 / 20:52
1
answer

AES JSF Encryption

I have the following problem, I have an AES encryption algorithm. When I run it through main it works, but when I run it on a jsf page and decrypt the text it returns several ????? when it contains special character in the String. I'm using the...
asked by 23.09.2016 / 17:32
1
answer

How to use more than one extends?

When I create the project it comes like this public class MainActivity extends AppCompatActivity{ Would you like to use more than extends how to do? import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import...
asked by 04.02.2016 / 00:05
1
answer

Is there a difference between Java platforms?

In: Java Desktop Java Mobile Java Web Are the languages different, or is it standard by just changing the environment?     
asked by 02.07.2016 / 03:05
2
answers

Validation Login and Password Primeface and JSF

I have a very simple system of Registration and Login, I have done a validation in both fields. I want to adapt this validation to something more specific like: Login does not exist Invalid password Currently my validation has a sing...
asked by 29.06.2016 / 17:29
2
answers

Is it possible to store user inputs by Scanner Class in a database?

IhaveanapplicationmadeinJava,andIneedtostoretheuser'scadastralinformationinthedatabase:cpf,password,name,address,phoneSystem.out.println("Digite seu CPF"); cpf = ler.nextLine(); System.out.println("Senha: "); senha = ler.nextLine();...
asked by 29.06.2016 / 16:07
1
answer

Algorithm of prime numbers only works for the first verified number

I have created a prime number verification program and receive n entries in it. That is, n is the number of test cases. The problem is that in the first test case everything works fine. Already in the second onwards the program err...
asked by 01.07.2016 / 22:15
1
answer

Does Variable Calendar update the other when the second one is updated?

Hello, I've been messing with the GregorianCalendar class and I came across the following problem: You had to go from one point in the calendar to the other, then set the first point as the second, then "reset" the second field and go back. b...
asked by 01.07.2016 / 13:59
1
answer

Methods for testing Spring application are not found

I'm following the following article: Introduction To Spring MVC Test Framework I have the following code: this.mockMvc.perform(get("/product/1")) .andExpect(status().isOk(). .alwaysExpect(content().contentType("application/json;charset=UT...
asked by 18.02.2016 / 12:16
1
answer

How to make a regex that accepts one line but not two?

I get lost while doing any complex regex. I use the following code in java: Pattern pattern = Pattern.compile("tentativas de regex aki"); Matcher matcher = pattern.matcher(conteudo); while(matcher.find()) { System.out.println(matcher.gro...
asked by 16.02.2016 / 01:17