来统计一下中国java程序员使用最多的语法格式?

Wuxuehui Wuxuehui 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
大家投一票 :)

方式一:
==================================
public class MailSender {
public static void main(String[] args) {
JFrame frame = new MailSenderFrame();
frame.show();
}
}
class MailSenderFrame extends JFrame implements ActionListener {
public MailSenderFrame() {
setTitle("Mail Sender");
setSize(500,500);
addWindowListener( new WindowAdapter() {
public void windowClosing(WindowEvent e) { System.exit(0);}
});
}
}
==================================
方式二:
==================================
public class MailSender
{
public static void main(String[] args)
{
JFrame frame = new MailSenderFrame();
frame.show();
}
}
class MailSenderFrame extends JFrame implements ActionListener
{
public MailSenderFrame()
{
setTitle("Mail Sender");
setSize(500,500);
addWindowListener( new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
}
==================================
主要是大括号 "{}" 的结构搭配格式!我想谁都清楚,写大程序时候,随着类与方法的增加,这些N多的大括号在不加注释得情况下会影响程序的正常编译。

保持良好的语法格式写程序,是好程序所必须的。中国的程序们都喜欢和习惯用那个方式呢?
...全文

相关推荐

评论 64
收藏 已收藏
分享
返回顶部
Wuxuehui
非技术区 23,404 成员 70,505 内容