Experience matters for sure. Number of years working with a specific technology don't matter much. List the experiences, the details, your impact, your challenges. Not how many years you spent working with Java.
I have definitely seen candidates being rejected because they did not have "enough experience", meaning that they had not accomplished things or tackled certain challenges. They had never worked with micro services, they had never had experience with continuous integration, they had never worked with multidisciplinary teams, they had never built a real-time application, they had never architected a scalable back end service, they had never worked with legacy systems, etc, etc, etc. Whatever the reason is, it's all about the challenges, the experiences themselves. Not exactly time. At all places I've ever worked at, I've never heard of a candidate being rejected because "we require 4 years of experience in Ruby and they only have 3".
Even if the job post includes a number, those are rough references. I would still not include it in my resume, especially not discriminated by programming language.
Happy to hear your thoughts as well. Thank you!