我只是尝试从Windows命令输入中了解我的PHP版本,
C:\> php -v
但它无法正常工作.它说php is not recognized as internal or external command.
我的java代码如下.我写了url = URL(s); 但事实并非如此.我想进行一次转换操作,将从用户处获取的字符串转换为URL.如何进行此操作?有什么方法可以做到这一点吗?
public static void main(String[] args) {
System.out.println("Welcome to Download Manager");
URL url;
String s;
Scanner scan= new Scanner(System.in);
s=scan.nextLine();
url=URL(s);
Download download=new Download(url);
}
Run Code Online (Sandbox Code Playgroud)