真假 [英] true/false

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

问题描述

嘿伙计们。


我在java中回复真假的事情时遇到了麻烦。

Hey guys.

I''m having trouble returning true and false things in java.

展开 | 选择 | Wrap | 行号

推荐答案

给你两个小问题:


1)那些BufferedReaders在那里做什么?

2)你的主要方法应该不返回任何东西(虚空);为什么它应该

返回一个布尔值?


亲切的问候,


Jos
Two small questions to you:

1) What are all those BufferedReaders doing there?
2) your main method is supposed to return nothing (a void); why HAS it supposed
to return a boolean value?

kind regards,

Jos



两个小问题:


1)那些BufferedReaders在那里做什么?

2)你的主要方法应该不返回任何东西(虚空);为什么它应该

返回一个布尔值?


亲切的问候,


Jos
Two small questions to you:

1) What are all those BufferedReaders doing there?
2) your main method is supposed to return nothing (a void); why HAS it supposed
to return a boolean value?

kind regards,

Jos



缓冲读者就在那里,因为这是我在其他程序中用于输入字符的内容。


所以我应该将所有计算放在main方法之前?

The buffered readers are there because that''s what i used in one of my other program for inputted characters.

So should i put all of the calculations before the main method?


从它的声音中,您需要编写一个函数来检查将返回布尔值的回文,并在主函数中调用它,或打印它是否是你主要的回文而不是试图将某些东西归还给无效函数。
From the sounds of it, you either need to write a function to check for palindromes that would return a boolean, and call it in your main, or print whether or not it is a palindrome in your main rather than trying to return something to a void function.


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

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