Java Iterate through a HashMap Example

Using for each to iterate through a HashMap Using for each to iterate through a HashMap import java.util.HashMap; import java.util.Map; public class IterateHashMap { public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); map.put("key1", "value1"); map.put("key2", "value2"); for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println(entry.getKey() + " = " + entry.getValue()); …

Some notes on CRUD application – Node.js, Express.js & MongoDB

CRUD – READ In Express, we handle a GET request with the get method: app.get(endpoint, callback) endpoint is the requested endpoint. It’s the value that comes after your domain name. Here are some examples: When you visit localhost:3000, you’re actually visiting localhost:3000/. In this case, browsers requested for /. You’re reading this article on https://zellwk.com/blog/crud-express-mongodb/. …