Questions tagged [java-8]

Use this tag for questions specific to Java 8 which is version 8 (internal number 1.8) of the Java platform, released on 18 March 2014. In most cases you should also specify the java tag.

0
votes
0answers
10 views

Java 8 LocalDateTime has different results

I am trying to update some code to use Java 8's feature for parsing multiple date formats. my local time on my box is set to UTC-11.the below code works when using the SimpleDateformat.DateFormat ...
0
votes
4answers
52 views

Sum each element of two List<Integer>s into a new list

How to merge two lists to one list by included value of same index.I have 2 lists and I want to merge two lists by included value of same index.(If possible, please suggest me on way of java 8: ...
0
votes
0answers
35 views

Java Application with Single Instance per User

currently I am struggling with the problem of a single instance JavaFX application, packed into an .exe using install4j. The application should run on a Windows terminal server and every user should ...
2
votes
1answer
55 views

How to install openJdk 8 in windows 64 bit os

I need to install open JDK in my wiondows 64 bit os.I have used ORACLE open JDk and downloaded from the below link:https://jdk.java.net/8/While downloading I have selected Accept License Agreement ...
0
votes
1answer
41 views

Classes not loading properly within CompletableFuture

Below is the code which I wrote using CompletableFuture - CompletableFuture<String> completableFuture=CompletableFuture.supplyAsync(() -> {printResult();return "complete future!"...
4
votes
1answer
52 views

Convert Big Integer value to eight bit bytes(2s complement big endian) sequence which is multiple of 8 in Java

How to convert big integer to the following byte array form in Java:Big Integers are encoded as a sequence of eight-bit bytes, in two's complement notation, transmitted big-endian. If the length of ...
4
votes
3answers
60 views

When implement Predicate instead of boolean

I was reading a not related thread , when I read a comment: Any time I find myself needing a multi-line lambda, I move the lines to a private method and pass the method reference instead of the lambda....
2
votes
2answers
57 views

How to create HashSet from List<Object> by taking multiple field values from object with Java8 Stream?

HistoryRecord class:public class HistoryRecord {Long createdBy;Long modifiedBy;public Long getCreatedBy() {return createdBy;}public void setCreatedBy(Long createdBy) {this....
1
vote
1answer
26 views

JMS message selector on Object message

I working on liberty 18.0.0.2 with JavaEE 8 .I created Custom jms object message like this : public class MyTextMessage extends implements Serializable {private String text;private ...
1
vote
2answers
50 views

Cannot invoke forEach((<no type> de) -> {}) on the primitive type void

I Have a list of elements and I want to create a constructor inside a forEach element, but I got the error: Cannot invoke forEach(( de) -> {}) on the primitive type voidList<MatchEventMobileApp&...
5
votes
1answer
55 views

Java 8 compute() and computeIfPresent() to check an existing value

I have this piece of code :if (notificationSend.get(key) !=null && notificationSend.get(key).equals(value)) {return true;} else {notificationSend.put(key, value);return false;}...
0
votes
1answer
12 views

Can't deploy basic android app with Android Studio on Windows Vista with JDK 8

I have a Windows Vista Home Premium 32-bit computer. I am running the stable Android Studio 3.2.1 with the JAVA_HOME environment variable correctly set to the stable C:\Program Files\Jaba\jdk1.8.0_191....
-1
votes
1answer
50 views

Java Game with JavaFX Canvas | Canvas stops updating

I use Java to create a game with the JavaFX Canvas.I pass the Canvas graphicsContext to my GameLoop, which launches an extra thread. From there, I pass my graphicsContext via an ObjectHandler to ...
1
vote
1answer
63 views

java stream operation to check and return a specific object

I'm trying to learn Java Stream API and I'm writing some examples.So my example is as follows:I have a list of lists, every list can contain many nodes.I want a program that checks and returns a ...
4
votes
1answer
71 views

Fork-Join Pool in Streams

I had searched through various articles online and Stack Overflow questions but I am not able to find the perfect answer for this. Many questions are there which are close to this, but are slightly ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,