Learning Journey Based on Android ndk-JNI Data Type

Source: Internet
Author: User
Based on Android ndk Learning Journey ----- JNI Data Type

Classic old-fashioned Process , LearningProgramming LanguageThings , Learn the most basic data types first , JNI This is also true. JNI Defines a series of basic data types and reference data types and Java .

 

1, Basic Data Type

The following table describesJavaBasic data types andJNISpace occupied by the correspondence between basic data types.

Just observe and you will find,Actually, it's just the basic data type.,JNIThe basic data type is onlyJavaThere are multiple Basic Data Types'J'Only

Of course, JNIAndJavaNot inJsize,Definition:

Typedef jint jsize;

ActuallyJsizeInteger is used to describe basic metrics and sizes, and there is no mystery.


2 , Reference Data Type

JNIReference Type AndJavaCorresponding Relationship As follows:
Tree hierarchy chart:

 

AndJavaSame, JobjectIs of all reference types Father. It's easy to understand ? Haha. AboutJthrowable, JNIThere is also a thread concept.

3,
The jvalue type

JvalueIs a collection of basic and referenced data types.,It is defined as follows:

Typedef Union jvalue {

Jboolean Z;

Jbyte
B;

 
JcharC;

Jshort
S;

Jint
I;

Jlong
J;

Jfloat
F;

JdoubleD;

Jobject 
L;

}
Jvalue;

 

 

If you have any questions, please leave a message. Your personal skills are limited. If you have any questions, please point them out.,Thank you for your consideration.,

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.