I want to make a Android java package to intent to an activity But whenever i trying to intent it is giving me nullpointerexception When I run it There is a newweb.java class in which there is this function
Public Void openweb(Context con,String url){
Intent i=new Intent(con,myweb.class);
i.putStringExtra("webcode",url);
startactivity(i);
}
myweb is an activity
In Mainactivity
newweb web=new newweb();
Web.openweb(Mainactivity.this,url);
But error occurred nullpointerexception in newweb during intent