We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 60de120 + d7fa069 commit 1ade419Copy full SHA for 1ade419
1 file changed
URlclass.java
@@ -0,0 +1,21 @@
1
+//https://www.facebook.com/naman.patidar.104/posts/1218126358573435
2
+// subscribed code House youtube channel
3
+import java.net.*;
4
+import javax.swing.JOptionPane;
5
+
6
+public class URL1 {
7
+ public static void main(String args[]) {
8
+ try {
9
+ URL u = new URL("https://google.com");
10
11
+ System.out.println("Protocol : " + u.getProtocol());
12
+ System.out.println("Host : " + u.getHost());
13
+ System.out.println("Port : " + u.getPort());
14
+ System.out.println("File : " + u.getFile());
15
16
+ }
17
+ catch(Exception e) {
18
+ JOptionPane.showMessageDialog(null , e);
19
20
21
+}
0 commit comments