xxxxxxxxxx
// Assuming you have a WebView instance named "webView"
webView.getSettings().setJavaScriptEnabled(true); // Enable JavaScript
webView.setWebViewClient(new WebViewClient()); // Use the default WebViewClient
String url = "https://www.example.com/"; // Replace with the desired URL
webView.loadUrl(url); // Load the URL in the WebView
xxxxxxxxxx
// Private variable
private WebView web;
// Locating the webView ID form (For example activity_main)
myWebView = findViewById(R.id.myWebView);
// Loading the URL (google.com) into the webview
web.loadUrl("https://google.com");