Dương Mạnh Cường
New member
What will be the output of the following Java program?
A. 1
B. 0
C. -1
D. garbage value
Code:
import java.net.*;
class networking
{
public static void main(String[] args) throws MalformedURLException
{
URL obj = new URL("https://ehoidap.com/javamcq");
System.out.print(obj.getPort());
}
}
B. 0
C. -1
D. garbage value