gpt4 book ai didi

intellij-idea - 如何将内部类移动到外部

转载 作者:行者123 更新时间:2023-12-03 12:18:32 25 4
gpt4 key购买 nike

有一个内部类,例如

public class Foo {
public static void main(String[] args) {
}

@Data
public static class Award {
private final int id;
private final String name;
}
}

我想把Award移出FooIntellij IDEA能支持吗?我尝试选择代码,然后选择 Refactor 菜单的 Move 菜单。但它暗示 enter image description here

最佳答案

不需要选择整个类,只需点击类名并调用Refactor - Move(F6热键)。会发生这样的事情:

enter image description here

关于intellij-idea - 如何将内部类移动到外部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38009844/

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