本文介绍了找不到符号-方法ConfirmAction(java.lang.String)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java语法

Java Syntax

// confirmaction returns true to exit or false to continue/error
if (ConfirmAction(decision) == false)



是循环的正确语法吗?



is that the correct syntax for the loop?
is ConfirmAction a var or a command?

推荐答案

Winter_Walk写道:
Winter_Walk wrote:

循环的正确语法?


是的.可以将其缩短:


Yes. It can be shortened though:

if (!ConfirmAction(decision))


这与说"If ConfirmAction(decision)不是true"相同.


This is the same as saying "If ConfirmAction(decision) is NOT true".

Winter_Walk写道:
Winter_Walk wrote:

ConfirmAction是变量还是命令?

is ConfirmAction a var or a command?


在这种情况下,ConfirmAction是一个方法(如您所说,命令),根据您传递给它的参数,它返回true或false.
您不能将参数(在本例中为决定")传递给变量.


In this case, ConfirmAction is a method (command, as you say), which either returns true or false depending on the argument you pass to it.
You can''t pass arguments (in this case "decision") to a variable.


这篇关于找不到符号-方法ConfirmAction(java.lang.String)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-19 06:48