下载此文档

java 资料(java 资料).doc


文档分类:IT计算机 | 页数:约19页 举报非法文档有奖
1/19
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/19 下载此文档
文档列表 文档介绍
java 资料(java 资料)
The fourth chapter of the behavior of objects (operation instance variables)
At the beginning of that picture, every time I saw it, I wanted to laugh. (the expression and action of the goods were all in place = = the one on the back page, and the jokes were very powerful ~!). Well, this chapter is mainly around the object to explain some skills.
Depending on the ing argument (arguments) or the instance variable (instance variable) of the object, the same method can have different representations in different objects of the same type.
The argument (arguments) is the actual value passed to the method, and it es a parameter after the method is passed in. The parameter (parameters) and local variable (local) is similar to the same. Changing the parameter does not change the argument. (like C) the type of the value of the parameter passed in and returned can be implicitly enlarged or explicitly reduced.
You can return a value from the method, the best return statement to return (I found the statement when the code returns does not return to the wrong P78, but the final answer to the question is not so embarrassed, generally only), return a value, but can return an array, then deep, can return to the ArrayList, in other words, as long as you have a good package, can be bination of any variable to return any number of any type. (it's too powerful.)
Java is called pass by value, and if the calling argument is a reference variable, the same copy is used.
With setter (mutator) and getter (accessor) encapsulation (encapsulation), the object instance variables can be guaranteed by setting setter to prevent spoof. (setting instance variables with private, setting setter and getter with public), reducing the efficiency of reading and changing instance variables, but improving the resistance, resilience and resilience of programs.
Instance variables have default values (shaping 0, floating point 0, Boolean false), and local variables have no default values

java 资料(java 资料) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数19
  • 收藏数0 收藏
  • 顶次数0
  • 上传人rjmy2261
  • 文件大小30 KB
  • 时间2017-11-18
最近更新