gpt4 book ai didi

Netbeans 格式问题

转载 作者:行者123 更新时间:2023-12-04 06:29:47 25 4
gpt4 key购买 nike

我正在尝试将我的格式设置为我的教授希望我的类(class)使用的方式,除了公共(public)和私有(private)有自己的线路并且找不到摆脱它的选项之外,一切都是正确的。谢谢您的帮助!!我发了一张照片,但我想你第一次注册后就不能这样做了。

现在它格式化后看起来像这样:

public
boolean add(T payload)
{
abarr_ListNode<T> nextNode = new abarr_ListNode<T>(payload);
abarr_ListNode<T> firstNode = getFirstNode();
abarr_ListNode<T> lastNode = getLastNode();

我希望它看起来像这样:
public boolean add(T payload)
{
abarr_ListNode<T> nextNode = new abarr_ListNode<T>(payload);
abarr_ListNode<T> firstNode = getFirstNode();
abarr_ListNode<T> lastNode = getLastNode();

谢谢!

最佳答案

对于修饰符(公共(public)、私有(private)等),请检查以下内容:

Tools --> Options --> Editor --> Formatting.

Select Java from the Languages drop down list.

Select Alignment from the Category drop down list.



确保 修饰符后复选框未选中。

要将花括号放在新行上(来自同一格式选项卡):

Select Braces from the Category drop down list.

Select New Line from whichever of the drop down lists in the Braces Placement Section is relevant to you.

关于Netbeans 格式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5560863/

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