Questions tagged as 'java'

1
answer

What is left to configure with Spring boot?

The settings I usually use with spring are based on the Java class, as in this example link . If this project used spring boot , what settings would still be required to configure in classes? I looked at an example in which to set up...
asked by 08.02.2016 / 01:55
2
answers

Back to top if size is not reached

Well, I got a lot of fucking work this week and I'm having trouble with a part of it ... It's the following, I have to set up a system for a bracelet shop, which gives the option of choosing size and pendants, each pendant and size with its leng...
asked by 26.03.2015 / 22:11
1
answer

NullPointerException when removing element from stack

I'm trying to implement a Java stack structure, but when I try to remove an element I get the following error: > Exception in thread "main" java.lang.NullPointerException at br.com.magnoliamedeiros.pilhafila.LinkedList.remove(LinkedList...
asked by 12.12.2016 / 00:26
2
answers

Call another Layout

When placing email and password the app should call another layout. I just can not do this ... Intent intent = new Intent(this, R.layout.activity_estado); startActivity(intent); Report the following error: Can not resolve constructor 'Inten...
asked by 09.01.2017 / 16:34
2
answers

How do I change the color of AlertDialog

I put in my app where you can show the dialog to exit the application, but the dialog is black. I wanted him to go white. How do I change the AlertDialog theme? @Override // SAIR DA APLICAÇÃO public void finish() { if (sair) {...
asked by 17.11.2016 / 05:42
2
answers

Press the button on a screen that is a fragment and go to another fragment. How to do?

I have a class of type Fragment and I would like that when the user clicks on the button it would go to another screen that is fragment .. how can I do this? public class AlertaFragment extends Fragment { @Override public View o...
asked by 02.02.2017 / 14:17
2
answers

Functions do not end

After executing the 4 functions it should print the time it took to execute public class main { public static void main(String[] args) { long init = System.currentTimeMillis(); ataque1(); ataque2(); ataque3(); ataque4();...
asked by 06.07.2015 / 23:49
2
answers

Problem with String Negation

A part of my code: // faça: do { System.out.println("Você deseja sentar na Janela (J) ou Corredor (C) ?"); opcaoSentar = leer.next(); // se a opção foi J if (opcaoSentar.equals("J")) { System.out.println("Venda Efetiva...
asked by 07.04.2017 / 23:53
3
answers

Make a static method in the main class that writes on the screen all even numbers from 1 to 10000 that are palindromes

This is my method: public static void B() { int vet[]=new int [100]; int vet2[]=new int [vet.length/2]; for(int i=0;i<=vet.length;i++) { vet[i]=i+1; } for(int i=0;i<vet.length;i++) { int rest...
asked by 09.03.2017 / 11:04
2
answers

Combine more than one condition in an if

Is it possible to combine more than one condition in the tire industry? Example: boolean existe = pessoa tem 23 ou pessoa tem 22 ? true : false ; I'm trying but I can not.     
asked by 24.03.2017 / 19:03