/r/javaTIL
A place for sharing something new you've learned about the Java programming language. Share code snippets, discuss ideas, and provide feedback to other coders!
Welcome to /r/javaTIL! This is a place designed to share interesting things you've learned to do in Java, as well as to discover new ideas from other redditors. Posts can range from something cool you picked up in your 101 class, to much more complicated things from the world beyond school.
Please remember to always be respectful, but don't be afraid to give people feedback on their ideas!
There are only a few basic rules:
Feel free to message the mod if you have any feedback or questions.
Related Subreddits
/r/javaTIL
I have created type safe hashmap in Java. The hashmap can store any type of object and retrieve the object without explicit cast:
http://millionstrengthknowledge.com/resource/java/programming/typeSafeMap.html
Author of one of Java learning books recommend to use String as ID variables, because you don't do math to them and by using String you secure yourself from int/long/etc choice errors in advance
What do you think about this?
Which class cannot be a subclass in java?
A. Abstract class
B. Parent class
C. Final class
D. None of the above
Websocket is used to develop two way communication between server and browser. For example, in a chat application, if a user sends a message to a different user, the the application sends that message to the server first and the server informs the application of the second user . If we don’t use websocket, the application or the client will have to pull the server data continuously for any new updates.
In Sprint Boot, we can easily create a websocket application. In this tutorial, I will show you how to create a websocket server in Spring boot. We will learn how to connect and disconnect from a socket server and how to send a simple text message. The client will subscribe to the server, it will accept a string and push a separate string to the subscriber client.
https://www.opencodez.com/java/simple-websocket-application-springboot.htm
📷
One of the many definitions for synonyms is: “a word or phrase that means exactly or nearly the same as another word or phrase in the same language, for example shut is a synonym of close.”
However, we often find that the concept of synonyms can be confused when using this functionality as we try to match similar products that we want to be displayed within a search results list through cataloguing the values of their characteristics but, in many cases, without these actually being a true synonym.
https://www.empathy.co/blog/applying-synonyms-choose-well-and-increase-the-findability-of-your-site/