当前位置:网站首页>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 outStack : It's a data structure , First in, then out , Like a clip- The components of the stack
Stack space : Stack memory is stack spaceStack 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 inTop element of stack : The last stack frame put in- Stack operation
Pressing stack : It refers to the process of putting elements into stack spaceBomb 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)
边栏推荐
- Simple network configuration for equipment management
- Will the filing free server affect the ranking and weight of the website?
- Configure an encrypted web server
- Zhimei creative website exercise
- 2022-07-07日报:GAN发明者Ian Goodfellow正式加入DeepMind
- Error in compiling libssl
- leetcode刷题:二叉树26(二叉搜索树中的插入操作)
- SQL injection -- Audit of PHP source code (take SQL lab 1~15 as an example) (super detailed)
- Dialogue with Wang Wenyu, co-founder of ppio: integrate edge computing resources and explore more audio and video service scenarios
- (待会删)yyds,付费搞来的学术资源,请低调使用!
猜你喜欢

全球首堆“玲龙一号”反应堆厂房钢制安全壳上部筒体吊装成功

ES底层原理之倒排索引

Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment

【深度学习】图像多标签分类任务,百度PaddleClas

【PyTorch实战】图像描述——让神经网络看图讲故事

Solve server returns invalid timezone Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually

ENSP MPLS layer 3 dedicated line

H3C HCl MPLS layer 2 dedicated line experiment

【统计学习方法】学习笔记——提升方法

Sign up now | oar hacker marathon phase III midsummer debut, waiting for you to challenge
随机推荐
Epp+dis learning road (2) -- blink! twinkle!
Error in compiling libssl
College entrance examination composition, high-frequency mention of science and Technology
Zhimei creative website exercise
How to use PS link layer and shortcut keys, and how to do PS layer link
SQL lab 26~31 summary (subsequent continuous update) (including parameter pollution explanation)
The road to success in R & D efficiency of 1000 person Internet companies
Typescript interface inheritance
EPP+DIS学习之路(2)——Blink!闪烁!
2022聚合工艺考试题模拟考试题库及在线模拟考试
SQL blind injection (WEB penetration)
ENSP MPLS layer 3 dedicated line
【统计学习方法】学习笔记——提升方法
Attack and defense world ----- summary of web knowledge points
H3C HCl MPLS layer 2 dedicated line experiment
对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
牛客网刷题网址
【统计学习方法】学习笔记——第五章:决策树
SQL Lab (46~53) (continuous update later) order by injection
盘点JS判断空对象的几大方法