PinnedExecute a Java program from NodeJSIn order to run a java file using NodeJS we can use inbuilt child-process NodeJS module. In child-process module a separate thread is created as child thread to run this program. child-process module has various functions and execSync is one of the f...Jun 29, 2022·1 min read
Sort a Map based on its value in JavaSuppose there is a map with values : {a=5 , z=6 , b=12} and you want to sort based on its values as {b=12 , z=6 , a=5} (descending order) Now if we want to sort the map based on values of map entry then we need to use PriorityQueue class. And here w...Jul 13, 2022·1 min read
Send messages to specific room id- SocketIOThere are many beginner devs who finds hard to send a message in specific room of a chat application. This blog will surely help you resolve your problem and custom dynamic events can be fired once you understand this blog. client side : server side...Jun 25, 2022·1 min read
HashMap in JavaA HashMap is a class in java which implements Map Interface that gives you a feature to store key-value pair. HashMap uses a hashing algorithm in which key is hashed and stored in array to that hashed index, hence retrieval and storing takes constant...Jun 25, 2022·4 min read