java.lang.NullPointerException in following code?
<p>i have two java classes of which one is activity class now from that activity class i want to call a functions of second class which is not an activity class.but when i call function GetRobotoRegularFont inside Font class its show me an error that "Caused by: </p>

<pre><code>java.lang.NullPointerException
at com.ojaswi.font.Font.GetRobotoRegularFont(Font.java:16)
at com.ojaswi.bookingscapemob.LoginActivity.onCreate(LoginActivity.java:29)
</code></pre>

<p>"..the code for two java file is..please anyone help me answer..</p>

<p>code for first Java file</p>

<pre><code>public class LoginActivity extends Activity {

EditText email;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.login);
    email = (EditText)findViewById(R.id.edtTextUname);
    email.setTypeface(new Font().GetRobotoRegularFont());


}
</code></pre>

<p>}</p>

<p>code for second Java file</p>

<pre><code>public class Font {

Typeface tf;
Context myContext;
public final Typeface GetRobotoRegularFont() {
    String fontPath = "fonts/Roboto-Regular.ttf";
    tf = Typeface.createFromAsset(myContext.getAssets(), fontPath);
    return tf;
}
</code></pre>

<p>}</p>
