小编Cod*_*rry的帖子

修饰符的非法组合:公共和私有

我遇到以下代码的问题...

/**
 * This class holds all of the information pertaining to 
 * a person's name.
 */
public class Name {

    private String first, middle, last, maiden, initials, prefix, suffix;
    private char middleInitial, firstInitial, lastInitial;
    private

    /**
     * Constructor for a Name given first, middle, and last names.
    */
    public Name(String first, String middle, String last) {

        this.first = first;
        this.middle = middle;
        this.last = last;
        this.middleInitial = middle.charAt(0);
        this.firstInitial = first.charAt(0);
        this.lastInitial = last.charAt(0);
        this.initials = String.valueOf(firstInitial + middleInitial …
Run Code Online (Sandbox Code Playgroud)

java syntax-error class-visibility

2
推荐指数
2
解决办法
2318
查看次数

标签 统计

class-visibility ×1

java ×1

syntax-error ×1