当前位置:网站首页>native关键字的作用
native关键字的作用
2022-06-28 03:57:00 【不想当个程序员】
在Thread类中 有start0;
在一个类中有一个没有方法体的start0(),按理来说是不可以的。这里用到了native关键字。
native关键字的作用是:
- 调用底层代码(也就是说当Thread类中走到了start0方法之后,程序的执行就不再受java代码控制,就会去调用底层C++等代码)
- 该关键字修饰的方法并且不提供实现体,它会进入本地方法栈,通过调用JNI接口实现对其他语言代码和代码库的使用。
- 内存中有一块专门开辟的区域:Native Method Stack,登记Native方法。
边栏推荐
- 猫狗队列的问题
- E-week finance Q1 mobile banking has 650million active users; Layout of financial subsidiaries in emerging fields
- Conversion between decimal and BCD codes in C language
- 互联网的发展促进了无界零售、数字零售、即时零售等一系列新模式的出现
- Matlab exercises -- exercises related to symbolic operation
- 抖音实战~取关博主
- 简单工厂模式
- Go language -select statement
- 僅用遞歸函數和棧操作逆序一個棧
- To quickly download JDK, in addition to the official Oracle download, is there a download address for the latest version available in China
猜你喜欢
如何遍历collections.OrderedDict,服了又忘记items
Multithreading and high concurrency IV: varhandle, strong weak virtual reference and ThreadLocal
GO语言-select语句
Iso8191 test is mentioned in as 3744.1. Are the two tests the same?
How to traverse collections Ordereddict, taking it and forgetting items
抖音实战~关注博主
27 years, Microsoft IE is over!
Difference between curdate() and now()
云厂商为什么都在冲这个KPI?
Matlab exercises -- basic data processing
随机推荐
Multi project design and development · introduction to class library project
01 overview, application scenarios, Download methods, connection methods and development history of mongodb
The SQL of filincdc always reports this error when there are multiple tables. How can I solve it
Why are cloud vendors targeting this KPI?
【Linux】【Mysql】ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘
Reading notes of top performance version 2 (II) -- Performance observation tool
易周金融 | Q1手机银行活跃用户规模6.5亿;理财子公司布局新兴领域
RT thread bidirectional linked list (learning notes)
设计一个有getMin功能的栈
JVM I: introduction to JVM and understanding of class files
UI自動化測試框架搭建 —— 編寫一個APP自動化
猫狗队列的问题
Une seule pile dans l'ordre inverse avec des fonctions récursives et des opérations de pile
The growth summer challenge is coming | learn and create two major tracks, and start the tutor registration!
Tiktok actual battle ~ take off the blogger
How to apply for ASTM E108 flame retardant test for photovoltaic panels?
10: 00 interview, came out at 10:02, the question is really too
The company leader said that if the personal code exceeds 10 bugs, he will be dismissed. What is the experience?
MSc 307 (88) (2010 FTPC code) Part 2 smoke and toxicity test
MSc 307 (88) (2010 FTPC code) Part 9 bedding test