serializable java 规则_java - 它是什么意思:serializable类没有声明一个静态的最终serialVersionUID字段?...

这个问题在这里已有答案:

什么是serialVersionUID,我为什么要使用它?                                     21个答案

我在标题中给出了警告信息。 我想了解并删除它。 我在这个问题上找到了一些答案,但由于技术术语过载,我不理解这些答案。 用简单的词语解释这个问题有可能吗?

附: 我知道OOP是什么。 我知道什么是对象,类,方法,字段和实例化。

P.P.S. 如果有人需要我的代码,它在这里:

import java.awt.*;

import javax.swing.*;

public class HelloWorldSwing extends JFrame {

JTextArea m_resultArea = new JTextArea(6, 30);

//====================================================== constructor

public HelloWorldSwing() {

//... Set initial text, scrolling, and border.

m_resultArea.setText("Enter more text to see scrollbars");

JScrollPane scrollingArea = new JScrollPane(m_resultArea);

scrollingArea.setBorder(BorderFactory.createEmptyBorder(10,5,10,5));

// Get the content pane, set layout, add to center

Container content = this.getContentPane();

content.setLayout(new BorderLayout());

content.add(scrollingArea, BorderLayout.CENTER);

this.pack();

}

public static void createAndViewJFrame() {

JFrame win = new HelloWorldSwing();

win.setTitle("TextAreaDemo");

win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

win.setVisible(true);

}

//============================================================= main

public static void main(String[] args) {

SwingUtilities.invokeLater(new Runnable(){

public void run(){

createAndViewJFrame();

}

});

}

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值