title: ClassCastException : cannot be cast to class and are in unnamed module of loader 'app'
body: <p>I am trying to build a simple email sending application in visual studio code.</p>
  <p>The tutorial that I am following is this:</p>
  <p><a href="https://www.technicalkeeda.com/spring-boot-tutorials/how-to-send-email-using-spring-boot" rel="nofollow noreferrer">https://www.technicalkeeda.com/spring-boot-tutorials/how-to-send-email-using-spring-boot</a></p>
  <p>When I run my project I am getting this exception error:</p>
  <pre><code>Exception in thread &quot;main&quot; java.lang.ClassCastException: class 
  MailServiceImplementation cannot be cast to class 
  MailService 
  MailServiceImplementation and 
  MailService are in unnamed module of loader 'app')
  </code></pre>
  <p>To see my <code>MailService</code> and <code>MailServiceImplementation</code> classes, please visit the above mentioned link. Kindly help me with this error.</p>