I wrote a code(in Java), and I want to publish that to coders community. Yes, I want to contribute to the community but wait, what if someone copies my code and puts their license with my code and claims that they are the original author of the code???? How can I ensure that code belongs to me and anyone can contribute in and/or anyone can use that code. Do I require any kind of license for this? If yes then what kind of license do I need and how can I get that license?
1 Answer
I think you are looking for an open-source license. If you would like specific protections for your code you need a license. The Open Source Foundation has a list of licenses here.
How can I ensure that code belongs to me and anyone can contribute
The GPL 3.0 might be a fit for your project, but ultimately the decision of license is up to you.