非法字符错误:'\ u200b' [英] Illegal Character error: '\u200b'

查看:3607
本文介绍了非法字符错误:'\ u200b'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在面向对象编程类中为小行星游戏制作了一个小行星场,我收到了一个非法的字符错误:'\ u200b'。问题似乎发生在第12行。(import java.awt.Point;和公共类Asteroid扩展PolyBlob之间的界限)

I'm making an Asteroid Field for an Asteroid Game in my Object Oriented Programming class and I am receiving an illegal character error: '\u200b'. The issue seems to be happening on line 12. (The line between import java.awt.Point; and public class Asteroid extends PolyBlob)

/*
 * University of Central Florida
 * COP3330 - Spring 2016
 * Author: Aundray Ortiz
 */
package asteroidfield;

import java.util.Random;
import blobzx.PolyBlob;
import blobzx.BlobUtils;
import java.awt.Point;
​
public class Asteroid extends PolyBlob
{
    private static final Random random = new Random();

    public Asteroid(int a, int b, double c)
    {
        super(-100,-100,c);
        int sides = 5 + random.nextInt(5);
        int[] x = new int[sides];
        int[] y = new int[sides];
        int going = 0;
        double direct = 0;
        double region = (Math.PI * 2)/sides;
        for(int num = 0; num<sides;num++)
        {
            going = 5 + random.nextInt(16);
            direct = (num * region) + (Math.random() * region);
            Point p = BlobUtils.rotatePoint(going, direct);
            x[num] = p.x;
            y[num] = p.y;
        }

        setPolygon(x, y);
        setRate(c);
        setDelta(a,b);
    }
}


推荐答案

\ u200b 是Unicode中的零宽度空间。

\u200b is a "zero-width-space" in Unicode.

您应删除第12行(空白行),保存文件,重新添加空行并再次保存。使用简单的文本编辑器。

You should delete line 12 (the blank line), save the file, re-add the blank line and save again. using a simple text editor.

如果不能解决问题,请删除第11行和第13行并重新创建它们。

If that doesn't fix it delete lines 11 and 13 as well and recreate them.

这篇关于非法字符错误:'\ u200b'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆