请帮助初学java程序员! [英] Please help a beginner java programmer!

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

问题描述

您好,

我正在教自己java并且完全卡住了。我正在使用java开发工具包和vista命令提示符来编译和解释程序。我收到的错误代码没有意义,因为它们引用的代码似乎对我来说很合适。下面是代码:

Hello,
I am teaching myself java and am completely stuck. I am using the java development kit and vista command prompt to compile and interpret programmes. I am getting error codes which don''t make sense because they refer to a code that seems all right to me. Here is the code:

展开 | 选择 | Wrap | 行号

推荐答案

仅+, - ,*和/字符是算术运算符。如果要将符号与字符进行比较,请使用''+'','' - '',''*''或''/'',它们是字符,而不是运算符。
The +, -, *, and / characters alone are arithmetic operators. If you want to compare sign to the characters, use ''+'', ''-'', ''*'', or ''/'', which are the characters, not the operators.


我意识到我应该使用if else语句。这是修改后的代码
I realised that I should have used if else statements. Here is the revised code
展开 | 选择 | Wrap | 行号


对不起Ganon我在看到你的回复之前发了第二件事。这里是我现在使用的代码
Sorry Ganon I posted the second thing before I saw your reply. here is the code i am now using
展开 | 选择 < span class =codeDivider> | Wrap | 行号


这篇关于请帮助初学java程序员!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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