我写的程序原代码是
public class hellouser{
public static void main(string[] arguments){
string username = system.getproperty("user.name");
system.out.println("hello," + username);
}
}
但是就是编译不过去提示如下:
D:\hellouser.java:2: cannot resolve symbol
symbol : class string
location: class hellouser
public static void main(string[] arguments){
^
D:\hellouser.java:3: cannot resolve symbol
symbol : class string
location: class hellouser
string username = system.getproperty("user.name");
^
D:\hellouser.java:3: cannot resolve symbol
symbol : variable system
location: class hellouser
string username = system.getproperty("user.name");
^
D:\hellouser.java:4: package system does not exist
system.out.println("hello," + username);
^
4 errors
还请大家帮着看看!其他的程序和这个也是一样可能是我什么地方没配制好吧!请大家指条明路!
public class hellouser{
public static void main(string[] arguments){
string username = system.getproperty("user.name");
system.out.println("hello," + username);
}
}
但是就是编译不过去提示如下:
D:\hellouser.java:2: cannot resolve symbol
symbol : class string
location: class hellouser
public static void main(string[] arguments){
^
D:\hellouser.java:3: cannot resolve symbol
symbol : class string
location: class hellouser
string username = system.getproperty("user.name");
^
D:\hellouser.java:3: cannot resolve symbol
symbol : variable system
location: class hellouser
string username = system.getproperty("user.name");
^
D:\hellouser.java:4: package system does not exist
system.out.println("hello," + username);
^
4 errors
还请大家帮着看看!其他的程序和这个也是一样可能是我什么地方没配制好吧!请大家指条明路!
public class hellouser{
public static void main(String[] arguments){
String username = System.getProperty("user.name");
System.out.println("hello," + username);
}
}
{
public static void main(String[] args)
{
String username = System.getproperty("user.name");
System.out.println("hello," + username);
}
}
{
public static void main(String[] args)
{
String username = System.getProperty("user.name");
System.out.println("hello," + username);
}
}注意很多地方都要大写的