Questions tagged as 'java-8'

1
answer

JavaFX Marquee exits node

I have a problem with the "Marquee" animation in JavaFx. This is the situation: I have an HBox with three nodes and in the central node I have a Label with a text that I want to make the animation, which works perfectly, but when it goes to the...
asked by 10.11.2016 / 10:18
2
answers

Unfortunately the app stopped problem with imageview Android kit kat (API 19)

Good morning coders. I tell you what happens to me. I'm making an app for android, native, but when trying to insert an imageview (as indicated by the official documentation link api level 16) ... the app works on devices lollipop 5.0 and u...
asked by 21.12.2018 / 21:39
2
answers

Reverse string using Streams in Java 8

I would like to reverse the order of a text string using Java Java API Java 8. This is what I have tried, but it does not make the investment. import java.util.Comparator; import java.util.stream.Collectors; import java.util.stream.Stream;...
asked by 20.06.2018 / 03:10
3
answers

Can switch be used with objects in java?

Hello very afternoon or evening ... my question is the following can you use the switches to compare objects ?? see it this way I have a window with 3 buttons, each button changes the background to a different color could the switch be implement...
asked by 03.02.2018 / 14:45
1
answer

How to make different actions when pressing a button?

I have found myself in a problem when doing a Java program, and that is that as I have the code it does not matter what button I press that is always going to execute the command of button 1 I think it is because I am wrongly selecting what what...
asked by 09.01.2018 / 15:18
1
answer

Difference between BinaryOperator and BiFunction? Java 8

I have learned Java 8, and it is still unclear to me the difference between BinaryOperator , and BiFunction . Can anyone explain the difference? Thanks in advance     
asked by 04.12.2016 / 13:06
1
answer

Get List item with lambdas

I am trying to migrate a code to Java 8, related to the classic exercises of Student / Teacher / Subject . I have some doubts about whether I am performing this lambda correctly to select a Student by id (Long field) of a List. Code to obtai...
asked by 19.05.2016 / 23:49
1
answer

Encrypt files in Java

I'm trying to encrypt a file and I have the following code in java, but when I run it, I'm sorry, the code is as follows: public class Prueba { public static void main(String [] args) { String comando1 = "-c"; String comando2...
asked by 21.10.2017 / 03:01
2
answers

Error with two persistence units: java.lang.RuntimeException: javax.annotation.processing.FilerException:

When compiling and executing in the IDE the application works well but when generating the jar it generates this error: An annotation processor threw an uncaught exception. Consult the following stack trace for details. java.lang.RuntimeExcept...
asked by 20.09.2017 / 03:25
1
answer

Help with vectors and prime numbers

Leer 10 enteros , store them in an array and determine in what position of the array the highest prime number read is. int vector[] = new int[10]; //Declaro, instancio vector int enteros = 0; // Variables a utilizar...
asked by 14.08.2017 / 00:03