1

Android - in WebView, what is the differece in the order of how I set up the WebView?

view story
linux-howto

http://stackoverflow.com – I have some code like this public class YoutubeActivity extends Activity { WebView webview = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webview = new WebView(this); setContentView(webview); It works ok most of the time, but sometimes it crashes on NullPointerException in other parts of the class. So what would be the difference if I declared it like this: public class YoutubeActivity extends Activity { WebView webview = null; @Override public void onCreate(Bundle savedIns (HowTos)