Can I give a default value like this to avoid null pointer exception?

前端 未结 0 333
野的像风
野的像风 2021-02-02 00:25

just a quick question that came to mind and can\'t really find an answer for;

Can I give variables default values such as this:

public class Laptop {
    /         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题