当前位置:网站首页>native关键字的作用
native关键字的作用
2022-06-28 03:57:00 【不想当个程序员】
在Thread类中 有start0;
在一个类中有一个没有方法体的start0(),按理来说是不可以的。这里用到了native关键字。
native关键字的作用是:
- 调用底层代码(也就是说当Thread类中走到了start0方法之后,程序的执行就不再受java代码控制,就会去调用底层C++等代码)
- 该关键字修饰的方法并且不提供实现体,它会进入本地方法栈,通过调用JNI接口实现对其他语言代码和代码库的使用。
- 内存中有一块专门开辟的区域:Native Method Stack,登记Native方法。
边栏推荐
- Has anyone ever used CDC to synchronize to MySQL with a deadlock?
- From zero to one, I will teach you to build a "search by text and map" search service (I)
- 【Linux】【Mysql】ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘
- 阿里P8倾情推荐,Fiddler抓包工具实战篇(一)
- Reading notes of top performance version 2 (II) -- CPU monitoring
- 【Matlab BP回归预测】GA优化BP回归预测(含优化前的对比)【含源码 1901期】
- 抖音實戰~關注博主
- mysql导入文本文件时的pager
- leetcode - 329. Longest increasing path in matrix
- Sum of squares of each bit of a number
猜你喜欢

How do I get the STW (pause) time of a GC (garbage collector)?

Games104 operation 2-colorgrading

Introduction to multi project development, basic design class library project use

From zero to one, I will teach you to build a "search by text and map" search service (I)

From zero to one, I will teach you to build a "search by text and map" search service (I)

公司领导说,个人代码超10个Bug就开除,是什么体验?

Secouer le son et se battre ~ prêter attention au blogueur

Lingge leangoo agile Kanban tool adds the functions of exporting card documents and pasting shared brain map nodes

How to clean the nozzle of Epson l3153 printer

Genicam gentl standard ver1.5 (2)
随机推荐
Annual comprehensive analysis of China's audio market in 2022
How can we speed up the chunksplitter when CDC extracts MySQL data in full?
Genicam gentl standard ver1.5 (2)
Short video platform development, click links and pictures to automatically jump to a new page
有人用cdc同步到mysql发生过死锁吗?
Has any boss ever seen repeated binlog messages when MySQL CDC uses datastream
互联网的发展促进了无界零售、数字零售、即时零售等一系列新模式的出现
Principle of event delegation
How do I get the STW (pause) time of a GC (garbage collector)?
What is the process of en 1101 flammability test for curtains?
仅用递归函数和栈操作逆序一个栈
Is it better for a novice to open a securities account? Is it safe to open a stock account
Why are cloud vendors targeting this KPI?
Lingge leangoo agile Kanban tool adds the functions of exporting card documents and pasting shared brain map nodes
短视频平台开发,点击链接、图片自动跳转到新的页面
Meichuang data security management platform has obtained the evaluation certificate of "data security product capability verification plan" of the Institute
政策利好,20多省市开启元宇宙发展规划
With the transformation of automatic empowerment, Feihe dairy accelerates its move towards digitalization!
视频直播系统源码,倒计时显示,商品秒杀倒计时
Go language learning tutorial (14)