当前位置:网站首页>Connect to blog method, overload, recursion
Connect to blog method, overload, recursion
2022-07-07 12:35:00 【Xiaobai shelter】
1. In and out
Enter the reference : Do it Unknown condition required
The ginseng : Feedback needed after completion
2. Method overloading (overload)
Definition : Same method name , Different parameter list . The list is divided into : Different numbers and types
The method is unique : Method name and parameters
3. Memory division :
Java Runtime Data Area : java Runtime area , General name JVM Memory
*
- Program counter :
A small area of memory . Action can be seen as a position indicator of the current program execution
- Static zone / Method area :
Save program files (class file ) And static data , Before the method is called , Also stored in the static area , There is also a runtime constant pool inside
- VM Stack : Also called stack memory
Stack memory is a space opened up based on stack data structure , The feature is first in and last out
Stack : It's a data structure , First in, then out , Like a clip
- The components of the stack
Stack space : Stack memory is stack space
Stack frame : Every stack element in the stack space It's called stack frame ( such as Every bullet in the magazine It's called stack frame )
Stack bottom element : The first stack frame put in
Top element of stack : The last stack frame put in
- Stack operation
Pressing stack : It refers to the process of putting elements into stack space
Bomb stack : Is the process of ejecting elements
- Stack memory , Is used to execute methods , Execution of all methods , Must be done in stack memory
- Native Method Stack :
Used to execute some local methods , such as hashCode etc. , The model and operation are similar to VM Stack consistency , Never mind ,
- Heap memory :
To save objects
4. recursive
Definition : Method calls the current method
recursive thinking : a. Recursion and iteration are equivalent It's a cycle b. The basic idea is to analogy in turn
Application scenarios : What a cycle can do , Recursion can do , But in this case, it is preferred to use loops , Recursion should be very memory consuming , Low operating efficiency ; however Like tree structure , You can't do a loop , It can only be done by handing it back
Common recursive application scenarios : So the tree structure ; Folder copy ; Fibonacci sequence
difficulty : It's not easy to understand recursion , drawing , Stack frame call graph
Be careful : There must be termination conditions , Otherwise, it will be like an endless cycle , As a result, the stack memory overflow problem occurs when you keep pressing the stack without bouncing the stack
5. Fibonacci sequence : It means that from the third item, each item is the sum of the first two items namely f(n)=f(n-1)+f(n-2) (n>2)
边栏推荐
- Vxlan 静态集中网关
- How to use PS link layer and shortcut keys, and how to do PS layer link
- [statistical learning methods] learning notes - improvement methods
- 静态Vxlan 配置
- In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)
- About sqli lab less-15 using or instead of and parsing
- 广州市召开安全生产工作会议
- SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
- wallys/Qualcomm IPQ8072A networking SBC supports dual 10GbE, WiFi 6
- 【二叉树】删点成林
猜你喜欢
SQL Lab (41~45) (continuous update later)
Decrypt gd32 MCU product family, how to choose the development board?
30. Feed shot named entity recognition with self describing networks reading notes
Tutorial on principles and applications of database system (009) -- conceptual model and data model
SQL Lab (46~53) (continuous update later) order by injection
Preorder, inorder and postorder traversal of binary tree
Vxlan 静态集中网关
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
SQL Lab (32~35) contains the principle understanding and precautions of wide byte injection (continuously updated later)
BGP third experiment report
随机推荐
SQL lab 1~10 summary (subsequent continuous update)
AirServer自动接收多画面投屏或者跨设备投屏
牛客网刷题网址
普乐蛙小型5d电影设备|5d电影动感电影体验馆|VR景区影院设备
Attack and defense world ----- summary of web knowledge points
关于 Web Content-Security-Policy Directive 通过 meta 元素指定的一些测试用例
[pytorch practice] use pytorch to realize image style migration based on neural network
Learning and using vscode
解密GD32 MCU产品家族,开发板该怎么选?
30. Feed shot named entity recognition with self describing networks reading notes
【统计学习方法】学习笔记——第五章:决策树
即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
Ctfhub -web SSRF summary (excluding fastcgi and redI) super detailed
Realize a simple version of array by yourself from
Visual studio 2019 (localdb) \mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports version 782 and earlier
Session
跨域问题解决方案
【二叉树】删点成林
盘点JS判断空对象的几大方法
利用栈来实现二进制转化为十进制