WilliamCode
WilliamCode
2017-10-17 05:57

简单的java程序编译失败

  • java
  • string
  • class
 package com.HelloWorld

import java.util.Arrays;

public class HelloWorld{
    public static void main(String[] args) {
        String hobbies[];
        hobbies = new String[5];
        hobbies [1] = "game";
        hobbies [2] = "fuck";
        hobbies [3] = "ok";
        hobbies [0] = "zoo";
        Arrays.sort(hobbies);
        String fuck;
        fuck = Arrays.toString(hobbies);
        System.out.println("The hobbies sorted is "+fuck);

    }
}
无法编译,错误提示:Exception in thread "main" java.lang.Error: Unresolved compilation problem: 

    at com.HelloWorld.HelloWorld.main(HelloWorld.java:6)
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

7条回答

为你推荐

换一换