How-to articles, tricks, and solutions about JAVA
How to call a SOAP web service on Android
To call a SOAP web service on Android, you can use the HttpURLConnection class to send an HTTP request to the web service and receive the response.
What is @ModelAttribute in Spring MVC?
In Spring MVC, the @ModelAttribute annotation is used to bind request parameters to method arguments in controller methods.
How can I pass a parameter to a Java Thread?
To pass a parameter to a Java thread, you can use a Runnable object and pass the parameter to its constructor.
How to use a Java8 lambda to sort a stream in reverse order?
To use a Java 8 lambda to sort a stream in reverse order, you can use the sorted() method of the Stream interface and pass a lambda function that compares the elements in reverse order.
What is the best way to tell if a character is a letter or number in Java without using regexes?
To tell if a character is a letter or number in Java without using regexes, you can use the Character class and its isLetter() and isDigit() methods.
Break or return from Java 8 stream forEach?
To break or return from a Java 8 Stream.forEach() operation, you can use the break or return statements as you would normally do in a loop.
Java 8: Difference between two LocalDateTime in multiple units
To find the difference between two LocalDateTime objects in multiple units, you can use the Duration class.
How can I edit a .jar file?
A .jar file is a Java Archive file that contains compiled Java code and resources (such as images, sounds, etc.) that can be used by Java applications.