请帮助解决错误 [英] help with an error please

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

问题描述

我正在尝试测试一个字符是否为输入字符。钥匙,我打算测试它

if(DataBits!= null)

{

stuff

}

就是这样,但我得到了

H:\> c:\ j2sdk1.4.1 \ bin \ javac.exe BubbleSort.java

BubbleSort.java:68:operator!=无法应用于char,< nulltype>

if(DataBits!= null)

^

1错误


如果你能提交一个相当简单的解决方案,我将非常高兴,提前感谢您的时间。


Steve

I am trying to test a character for being the "Enter" key, I figured to test it
if(DataBits!=null)
{
stuff
}
like that, but i got
H:\>c:\j2sdk1.4.1\bin\javac.exe BubbleSort.java
BubbleSort.java:68: operator != cannot be applied to char,<nulltype>
if(DataBits!=null)
^
1 error

if you could please submit a reasonably simple solution I would be very happy, thanks ahead of time for your time.

Steve

推荐答案

输入键难道不能产生换行符吗?然后你可以检查

Shouldn''t the enter key produce a newline character? Then you can check

展开 | 选择 | Wrap | 行号



我正在尝试测试角色是否为输入钥匙,我打算测试它

if(DataBits!= null)

{

stuff

}

就是这样,但我得到了

H:\> c:\ j2sdk1.4.1 \ bin \ javac.exe BubbleSort.java

BubbleSort.java:68:operator!=无法应用于char,< nulltype>

if(DataBits!= null)

^

1错误


如果你能提交一个相当简单的解决方案,我将非常高兴,提前感谢您的时间。


Steve
I am trying to test a character for being the "Enter" key, I figured to test it
if(DataBits!=null)
{
stuff
}
like that, but i got
H:\>c:\j2sdk1.4.1\bin\javac.exe BubbleSort.java
BubbleSort.java:68: operator != cannot be applied to char,<nulltype>
if(DataBits!=null)
^
1 error

if you could please submit a reasonably simple solution I would be very happy, thanks ahead of time for your time.

Steve



亲爱的。你现在想做什么JavaStudent?


只要解释你想要达到的目标,我肯定有一种简单的方法。

Oh dear. What are you trying to do now JavaStudent?

Just explain what you want to achieve and I''m sure there is a simple way of doing it.

与之前lol相同的程序,三个月,如果那个XD jeez lol可能会带给你们一个......哦,非常感谢你的提示:)
the same program as before lol, three months, probably take you guys one if that XD jeez lol...oh well thanks for the tip :)


这篇关于请帮助解决错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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