Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Vince Emigh
How to perform nested 'if' statements using Java 8/lambda?
Use flatMap as you are trying to add elements into the pipeline or a 1-to-many mapping. Map is a one to one mapping. ArrayList<Integer> result = (ArrayList<Integer>) IntStream.rangeClosed(1, 10) .boxed() .filter(i -> 10 % i == 0) .flatMap((Integer i) -> {return i!=5 ?
Java8 lambda how to perform nested if statements?
Use flatMap as you are trying to add elements into the pipeline or a 1-to-many mapping. Map is a one to one mapping. ArrayList<Integer> result = (ArrayList<Integer>) IntStream.rangeClosed(1, 10) .boxed() .filter(i -> 10 % i == 0) .flatMap((Integer i) -> {return i!=5 ?
English Language & Usage Stack Exchange
Yes it is correct. It probably sounds peculiar because it is the same as present tense. You can avoid confusion regarding tense if you say, for instance: I shut up when [somebody] [did something]. There are many English verbs (such as cut, put, cast, etc.) whose past tense and past participle are the same as present first-person.
Send object via socket
I want to send x object over socket but when I run this code i got nothings. it is stop at new ObjectInputStream(socket.getInputStream()) and don't do any thing else.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Vince
Contact Vince, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack