gpt4 book ai didi

java - 名称 'flight_Num' 必须与模式 '^[a-z][a-zA-Z0-9]*$' 匹配

转载 作者:行者123 更新时间:2023-11-30 04:37:15 25 4
gpt4 key购买 nike

当我在程序上运行 checkstyle 时,我不断收到此错误:

    NonRefundable.java:20:28: Name 'flight_Num' must match pattern '^[a-z][a-zA-Z0-9]*$'.

我不确定需要做什么来纠正这个问题。以下是针对此特定错误的注释:

/** Comments.
*
* @param flight_Num the flight number.
* @param trip_Data the information stored in the Itinerary object.
* @param base_Fare the double representing the initial cost of the trip.
* @param fare_AdjustmentFactor the number factored into the baseFare and
discountFactor used to calculate totalFare.
* @param discount_Factor the number factored into baseFare and
* fare_AdjustmentFactor to calculate totalFare.
*/
NonRefundable(String flight_Num, Itinerary trip_Data, double base_Fare,
double fare_AdjustmentFactor, double discount_Factor) {

super(flight_Num, trip_Data, base_Fare, fare_AdjustmentFactor);
this.discountFactor = discount_Factor;
}

最佳答案

Name 'flight_Num' must match pattern '^[a-z][a-zA-Z0-9]*$'

表示flight_Num中不允许使用_字符。

关于java - 名称 'flight_Num' 必须与模式 '^[a-z][a-zA-Z0-9]*$' 匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13182460/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com