public boolean function()default"英寸; [英] public boolean function() default" ";

查看:81
本文介绍了public boolean function()default"英寸;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

package uk.co.flamingpenguin.jewel.cli;

import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.String;

@Retention(value=RetentionPolicy.RUNTIME)
@Target(value={ElementType.METHOD})
public @interface Option {
    public String longName() default "";

    public String[] shortName() default {""};

    public String pattern() default ".*";

    public String description() default "";

    public String[] defaultValue() default {};

    public boolean helpRequest() default" ";
}





公共布尔值中的hava错误helpRequest()默认值;不兼容的错误



i hava error in public boolean helpRequest() default" "; incompatible error

推荐答案

不兼容的错误?那么,你应该只做兼容的错误。 :-)



嗯,成员 helpRequest()声明为布尔值 type(返回值类型),所以它的默认值可以是true,但不是字符串,就像你写的那样。



让我告诉你,代码不是通过复制和粘贴编写的;相反,你应该理解你写的每一个字而不是写下你不理解的字。



-SA
Incompatible error? Well, you should make only compatible errors. :-)

Well, the member helpRequest() is declared as of boolean type (return value type), so it's default value could be either true of false, but not string, as you wrote.

Let me tell you that code is not written by copy and paste; instead, you should understand every word you write and not write what you don't understand.

—SA


这篇关于public boolean function()default"英寸;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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