Skip to main content
bowmore's user avatar
bowmore's user avatar
bowmore's user avatar
bowmore
  • Member for 11 years, 10 months
  • Last seen more than a month ago
awarded
answered
Loading…
comment
Comparing dates (without the time part) in Java
Note that Instant.truncatedTo() will truncate using UTC offset.
revised
Loading…
answered
Loading…
awarded
awarded
comment
Pig Latin Translator in Java
@Justin In this instance, I thought it more important to encourage the good practice of properly closing resources, rather than nitpick over whether the System.in should really be closed (ever). But it's a valid remark.
comment
Pig Latin Translator in Java
An enhanced for loop is basically syntactic sugar for a for loop over an Iterable using its Iterator or over an array. The syntax allows you to specify the minimum to get a for loop. for (Type a : b) will assign to a each element of b of type Type in turn, until all of b's elements have been looped, or the loop code breaks out of the loop.
answered
Loading…
Loading…
awarded
awarded
comment
Removing duplicate values from an array
@PrabhatSubedi copy because the size will (most likely) be smaller than the original. And whitelist has the original size.
awarded
awarded
Loading…
Loading…
awarded
awarded
1 2 3
4
5
17