<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RainbowJier</title>
    <description>The latest articles on DEV Community by RainbowJier (@rianbowjier).</description>
    <link>https://dev.to/rianbowjier</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1264927%2F1bef8a0d-6bd9-4525-8623-b90a69342935.jpeg</url>
      <title>DEV Community: RainbowJier</title>
      <link>https://dev.to/rianbowjier</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rianbowjier"/>
    <language>en</language>
    <item>
      <title>Data Types</title>
      <dc:creator>RainbowJier</dc:creator>
      <pubDate>Thu, 25 Jan 2024 11:07:04 +0000</pubDate>
      <link>https://dev.to/rianbowjier/data-types-33ld</link>
      <guid>https://dev.to/rianbowjier/data-types-33ld</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;



&lt;ul&gt;
&lt;li&gt;Table Of Contents&lt;/li&gt;
&lt;li&gt;Basic Data Structure&lt;/li&gt;
&lt;li&gt;
Wrapper Types

&lt;ul&gt;
&lt;li&gt;system diagram&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;



&lt;h2&gt;
  
  
  Basic Data Structure
&lt;/h2&gt;

&lt;p&gt;There are eight major data types in Java, which can be divided into numerical, character, and boolean types.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Numerical Types&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;Ranges&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;byte&lt;/td&gt;
&lt;td&gt;8 bit&lt;/td&gt;
&lt;td&gt;-128 ~ 127&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;short&lt;/td&gt;
&lt;td&gt;16 bit&lt;/td&gt;
&lt;td&gt;-2^15 ~ 2^15 - 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;32 bit&lt;/td&gt;
&lt;td&gt;-2^31 ~ 2^31 - 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;long&lt;/td&gt;
&lt;td&gt;64 bit&lt;/td&gt;
&lt;td&gt;-2^63 ~ 2^63 - 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;32 bit&lt;/td&gt;
&lt;td&gt;single precision floating point type, such as 2.0f&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;double&lt;/td&gt;
&lt;td&gt;64 bit&lt;/td&gt;
&lt;td&gt;higher precision floating point type, such as 2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Character Types&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;Ranges&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;char&lt;/td&gt;
&lt;td&gt;16 bit&lt;/td&gt;
&lt;td&gt;Used to represent Unicode characters, 1 character = 2 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Boolean Types&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;Ranges&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;logical value&lt;/td&gt;
&lt;td&gt;true &amp;amp;&amp;amp; false&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Wrapper Types
&lt;/h2&gt;

&lt;p&gt;In Java, each primitive data type has a corresponding wrapper class. Assignment and conversion between the primitive types and their corresponding wrapper classes are achieved through automatic boxing and unboxing.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Primitive Data Types&lt;/th&gt;
&lt;th&gt;Wrapper Classes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;Boolean&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;char&lt;/td&gt;
&lt;td&gt;Character&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;byte&lt;/td&gt;
&lt;td&gt;Byte&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;short&lt;/td&gt;
&lt;td&gt;Short&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;td&gt;Integer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;long&lt;/td&gt;
&lt;td&gt;Long&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;td&gt;Float&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;double&lt;/td&gt;
&lt;td&gt;Double&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Automatic Boxing refers to automatically converting a primitive value into its corresponding object wrapper.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unboxing is the reverse process where an object wrapper's value is converted back to its corresponding primitive type.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  system diagram
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs56h8fnhsltzjt8o6l91.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs56h8fnhsltzjt8o6l91.png" width="665" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
    </item>
  </channel>
</rss>
