Object creating and accessing inside a jframe code behind not work : <p>I have created a class called player and beginner (<code>public class Beginner extends Player</code>)</p>

<p>then I tried to access beginner from the main class. It worked.
screenshot down below.
<a href="https://i.stack.imgur.com/1vhfe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1vhfe.jpg" alt="Main object create and access"></a></p>

<p>Then I tried to create another object and access that object from the jframe. It allows me to create the object (<code>Beginner b1= new Beginner();</code>)
But does not allow to access that object. It says <em>identifier expected</em>.</p>

<p>Here's the screenshot inside the jframe.
<a href="https://i.stack.imgur.com/SALPl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SALPl.jpg" alt="Inside jframe"></a></p>

<p>How can I access through the jframe code behind?? What causes this ?</p>

<p>note: I am still a beginner to java. So please do not misunderstand me for asking these type of questions. Thank you ..!</p>
